Parser

A low level XML parser.

The methods a parser should implement are documented in newxml.interfaces.isLexer;

Constructors

this
this(L lexer)
Undocumented in source.
this
this(Args args)

Generic constructor; forwards its arguments to the lexer constructor

Members

Aliases

CharacterType
alias CharacterType = L.CharacterType
Undocumented in source.
InputType
alias InputType = L.InputType
Undocumented in source.
StringType
alias StringType = CharacterType[]
Undocumented in source.

Functions

empty
bool empty()
front
auto front()
popFront
void popFront()

See detailed documentation in newxml.interfaces.isParser

save
auto save()
Undocumented in source. Be warned that the author may not have intended to support it.
setSource
void setSource(InputType input)

See detailed documentation in newxml.interfaces.isParser

Structs

XMLToken
struct XMLToken

The structure returned in output from the low level parser. Represents an XML token, delimited by specific patterns, based on its kind. This delimiters are not present in the content field.

Variables

chrEntities
StringType[StringType] chrEntities;

Contains character and text entities. Text entities might contain additional nodes and elements. By default, it is filled with XML entities.

lexer
L lexer;

The lexer associated with the parser.

processBadDocument
bool processBadDocument;

if set to true (default is false), the parser will try to parse any and all badly formed document as long as it can be processed.

testTextValidity
bool testTextValidity;

if set to true (which is default), then the parser will test for invalid characters, and will throw an exception on errors. Turning it off can speed up parsing.

xmlVersion
XMLVersion xmlVersion;
Undocumented in source.

Parameters

L

the underlying lexer type

preserveWhitespace

if set to Yes (default is No), the parser will not remove element content whitespace (i.e. the whitespace that separates tags), but will report it as text.

Meta