Struct Parser

A low level XML parser.

The methods a parser should implement are documented in std.experimental.xml.interfaces.isLexer;

Template arguments

struct Parser(L, ErrorHandler, std.typecons.Flag!("preserveWhitespace").Flag preserveWhitespace)
if (isLexer!L);

Constructors

Name Description
this Generic constructor; forwards its arguments to the lexer constructor

Methods

Name Description
empty See detailed documentation in std.experimental.xml.interfaces.isParser
front See detailed documentation in std.experimental.xml.interfaces.isParser
popFront See detailed documentation in std.experimental.xml.interfaces.isParser

Inner structs

Name Description
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.

Parameters

NameDescription
L the underlying lexer type
ErrorHandler a delegate type, used to report the impossibility to parse the file due to syntax errors
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

Authors

Lodovico Giaretta

Copyright

Copyright Lodovico Giaretta 2016 --

License

Boost License 1.0.