Skip to content

@graphty/graph-io / @graphty/graph-io / XmlHandler

Interface: XmlHandler ​

Defined in: common/xml.ts:41

The events of the tokenizer; every callback is synchronous.

Methods ​

doctype()? ​

optional doctype(text, line): void

Defined in: common/xml.ts:70

A DOCTYPE declaration (optional; its internal subset is never expanded).

Parameters ​

text ​

string

the declaration as written, from <!DOCTYPE to its >

line ​

number

the 1-based line of the <

Returns ​

void


end() ​

end(name, line): void

Defined in: common/xml.ts:57

An element ends.

Parameters ​

name ​

string

the element name

line ​

number

the 1-based line of the end tag (or of the self-closing start tag)

Returns ​

void


start() ​

start(name, attrs, line, ns): void

Defined in: common/xml.ts:51

An element starts (a self-closing element produces start then end).

Parameters ​

name ​

string

the element name as written, prefix included

attrs ​

ReadonlyMap<string, string>

the attributes, entities decoded, in document order

line ​

number

the 1-based line of the <

ns ​

string | null

the namespace URI the element's prefix (or the default namespace) is bound to: "" when the element is in no namespace, null when its prefix is undeclared or the name is not namespace-well-formed (a leading or trailing colon, two colons)

Returns ​

void


text() ​

text(text, line): void

Defined in: common/xml.ts:64

Character data between two tags (entities decoded, CDATA included), one call per run; whitespace-only runs are delivered too.

Parameters ​

text ​

string

the text

line ​

number

the 1-based line where the run starts

Returns ​

void