You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current parser options are primarily oriented towards streaming a document from a file or other reader source. However, one of the design goals behind Scanner was to additionally enable a more optimized in-memory, zero copy document parser for cases where that is feasible.
To that end, a new type can be created (one potential name is Parser) which accepts a full XML document as a slice and uses Scanner to go through the document one codepoint at a time, yielding events which can reference the underlying document rather than copying data as Reader does today. These events would reference the raw document data, so additional functions would be needed to apply transformations such as entity expansion and end-of-line normalization to the raw data if needed.
The text was updated successfully, but these errors were encountered:
The current parser options are primarily oriented towards streaming a document from a file or other reader source. However, one of the design goals behind
Scanner
was to additionally enable a more optimized in-memory, zero copy document parser for cases where that is feasible.To that end, a new type can be created (one potential name is
Parser
) which accepts a full XML document as a slice and usesScanner
to go through the document one codepoint at a time, yielding events which can reference the underlying document rather than copying data asReader
does today. These events would reference the raw document data, so additional functions would be needed to apply transformations such as entity expansion and end-of-line normalization to the raw data if needed.The text was updated successfully, but these errors were encountered: