Function: parseSt()
parseSt(
el,ctx):ST|undefined
Parse an ST element into a typed ST. Returns undefined when the
element is absent. Never throws.
A @nullFlavor declared beside non-empty text emits
CONTRADICTORY_NULL_FLAVOR. The text is kept: it is the document's own
content with no verbatim copy elsewhere, so withholding it would delete what
the document said (see parsePq).
Parameters
el
any
ctx
Returns
ST | undefined
Example
import { parseSt } from "@cosyte/ccda";
const title = parseSt(titleEl, { emit: () => {} });
console.log(title?.value);