XLE
v0.02.0
|
Deserializes element and attribute data from xml More...
#include <XmlStreamFormatter.h>
Classes | |
class | Scope |
Public Types | |
enum | Blob { BeginElement, EndElement, AttributeName, AttributeValue, CharacterData, None } |
using | InteriorSection = StringSection< CharType > |
using | value_type = CharType |
Public Member Functions | |
Blob | PeekNext (bool allowCharacterData=false) |
bool | TryBeginElement (InteriorSection &name) |
bool | TryEndElement () |
bool | TryAttribute (InteriorSection &name, InteriorSection &value) |
bool | TryCharacterData (InteriorSection &cdata) |
void | SkipElement () |
StreamLocation | GetLocation () const |
XmlInputStreamFormatter (const TextStreamMarker< CharType > &marker) | |
Protected Attributes | |
TextStreamMarker< CharType > | _marker |
Blob | _primed |
bool | _pendingHeader |
std::stack< Scope > | _scopeStack |
Deserializes element and attribute data from xml
This is an input deserializer for xml data that handles just element and attributes. The interface is compatible with InputStreamFormatter, and can be used as a drop-in replacement when required.
It's a hand-written perform oriented parser. It should perform reasonable well even for large files.
Note that this is a subset of true xml. Many XML features (like processing instructions, references and character data) aren't fully supported. But it will read elements and attributes – handy for applications of XML that use only these things. There is some support for reading character data. But it is limited and intended for simple tasks.