NodeLens
Interface: NodeLens
Section titled “Interface: NodeLens”Defined in: src/core/producer.ts:65
The narrow, relative-only surface a CustomProducer receives.
A custom producer never sees the raw XMLAdapter or escapes its subtree — it reads text and child nodes relative to the node it was mounted on.
Methods
Section titled “Methods”name()
Section titled “name()”name(): string | null;Defined in: src/core/producer.ts:67
Local (namespace-stripped) name of this lens’ own node (null if none).
Returns
Section titled “Returns”string | null
text()
Section titled “text()”text(): string | null;Defined in: src/core/producer.ts:69
Trimmed text content of this lens’ own node (null if empty).
Returns
Section titled “Returns”string | null
textAt()
Section titled “textAt()”textAt(xpath): string | null;Defined in: src/core/producer.ts:71
Trimmed text at a relative XPath (null if the node is absent/empty).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
xpath | string |
Returns
Section titled “Returns”string | null
attr()
Section titled “attr()”attr(xpath): string | null;Defined in: src/core/producer.ts:73
Value of an attribute reached by a relative XPath ending in /@name.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
xpath | string |
Returns
Section titled “Returns”string | null
all(xpath): NodeLens[];Defined in: src/core/producer.ts:75
A lens per node matching a relative XPath.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
xpath | string |
Returns
Section titled “Returns”NodeLens[]