Generic constructor; forwards its arguments to the parser constructor
The type of characters in the input, as returned by the underlying low level parser.
The type of input accepted by this parser, i.e., the one accepted by the underlying low level parser.
The type of sequences of CharacterType, as returned by this parser
Returns whether the cursor is at the beginning of the document (i.e. whether no enter/next/exit has been performed successfully and thus the cursor points to the xml declaration)
If the current node is an element, return its attributes as a range of triplets (prefix, name, value); if the current node is the document node, return the attributes of the xml declaration (encoding, version, ...); otherwise, returns an empty array.
Return the text content of a cdata section, a comment or a text node; in all other cases, returns the entire node without the name
Returns whether the cursor is at the end of the document.
Advances to the first child of the current node and returns true. If it returns false, the cursor is either on the same node (it wasn't an element start) or it is at the close tag of the element it was called on (it was a pair open/close tag without any content)
Advances to the end of the parent of the current node.
Returns the kind of the current node.
If the current node is an element, returns its local name (without namespace prefix); otherwise, returns the same result as name.
If the current node is an element or a doctype, returns its complete name; it it is a processing instruction, return its target; otherwise, returns an empty string;
Advances to the next sibling of the current node. Returns whether it succeded. If it fails, either the document has ended or the only meaningful operation is exit.
If the current node is an element, returns its namespace prefix; otherwise, the result in unspecified;
Initializes this cursor (and the underlying low level parser) with the given input.
Returns the entire text of the current node.
Returns true if XML declaration was not found.
Loads system entities if needed. If not used, then it can protect against certain system entity attacks at the cost of having this feature disabled.
The parser.
If set to Yes (default is No), then it'll ignore errors as long as it can still process the document. Otherwise it'll throw an appropriate exception if an error is encountered.
An implementation of the isCursor trait.
This is the only provided cursor that builds on top of a parser (and not on top of another cursor), so it is part of virtually every parsing chain. All documented methods are implementations of the specifications dictated by isCursor.