PullParser

Token based xml Parser. Templated to operate with char[], wchar[], and dchar[] content.

The parser is constructed with some tradeoffs relating to document integrity. It is generally optimized for well-formed documents, and currently may read past a document-end for those that are not well formed. There are various compilation options to enable checks and balances, depending on how things should be handled. We'll settle on a common configuration over the next few weeks, but for now all settings are somewhat experimental. Partly because making some tiny unrelated change to the code can cause notable throughput changes, and we need to track that down.

We're not yet clear why these swings are so pronounced (for changes outside the code path) but they seem to be related to the alignment of codegen. It could be a cache-line issue, or something else. We'll figure it out, yet it's interesting that some hardware buttons are clearly being pushed

Constructors

this
this(const(Ch[]) content)

Construct a parser on the given content (may be null)

Members

Functions

incremental
void incremental(bool yes)

experimental: set streaming mode

reset
bool reset()

Reset the parser

reset
void reset(const(Ch[]) newText)

Reset parser with new content

Properties

error
const(char[]) error [@property setter]
error
const(char[]) error [@property getter]

Returns the text of the last error

name
const(Ch[]) name [@property getter]

Return the name of the current token

next
XmlTokenType next [@property getter]

Consume the next token and return its type

value
const(Ch[]) value [@property getter]

Return the raw value of the current token

Variables

depth
int depth;
Undocumented in source.
localName
const(Ch)[] localName;
Undocumented in source.
prefix
const(Ch)[] prefix;
Undocumented in source.
rawValue
const(Ch)[] rawValue;
Undocumented in source.
text
XmlText!(Ch) text;
Undocumented in source.
type
XmlTokenType type;
Undocumented in source.

Meta