type
XParser
XParser is a simple, lightweight XML parser. It may be used as a pull parser by iterating through the element and text sections of an XML stream or it may be used to read an entire XML tree into memory as XElems.
constructors
make |
Construct input stream to read. |
---|
fields
col |
Current one based column number. |
---|---|
depth |
Get the depth of the current element with the document. |
doc |
Get the root document node. |
line |
Current one based line number. |
nodeType |
Get the current node type constant which is always the result of the last call to |
methods
close |
Close the underlying input stream. |
---|---|
elem |
Get the current element if |
elemAt |
Get the element at the specified depth. |
next |
Advance the parser to the next node and return the node type. |
parseDoc |
Parse the entire document into memory as a tree of XElems and optionally close the underlying input stream. |
parseElem |
Parse the current element entirely into memory as a tree of XElems and optionally close the underlying input stream. |
pi |
if the current node type is |
skip |
Skip parses all the content until reaching the end tag of the specified depth. |
text |
If the current type is |
Slot Details
close
col
depth
doc
elem
elemAt
line
make
next
src
XNodeType? next()
Advance the parser to the next node and return the node type. Return the current node type:
XNodeType.elemStart
XNodeType.elemEnd
XNodeType.text
XNodeType.pi
- null indicates end of stream Also see
nodeType
.
nodeType
src
XNodeType? nodeType { private set }
Get the current node type constant which is always the result of the last call to next
. Node type will be:
XNodeType.elemStart
XNodeType.elemEnd
XNodeType.text
XNodeType.pi
- null indicates end of stream