Skip to main content
Version: v0.0.3

Function: child()

child(el, localName): any

Return the first direct child element in the HL7 v3 namespace with the given local name, or undefined. Only direct children are considered (no descendant search), so structurally distinct same-named elements at deeper levels are not accidentally matched.

Parameters

el

Element

localName

string

Returns

any

Example

import { child } from "@cosyte/ccda";
const code = child(sectionEl, "code"); // Element | undefined