#include <XMLElement.h>
Public Member Functions | |
XMLElement () | |
Creates and initializes a new XML element. | |
XMLElement (map< string, string > *entities) | |
Creates and initializes a new XML element. | |
XMLElement (bool skipLeadingWhitespace) | |
Creates and initializes a new XML element. | |
XMLElement (map< string, string > *entities, bool skipLeadingWhitespace) | |
Creates and initializes a new XML element. | |
int | countChildren () |
Returns the number of child elements of the element. | |
void | addChild (XMLElement &child) |
Adds a child element. | |
void | setAttribute (string &name, string &value) |
Adds or modifies an attribute. | |
void | setAttribute (string &name, int value) |
Adds or modifies an attribute. | |
void | setAttribute (string &name, double value) |
Adds or modifies an attribute. | |
void | parse (string &file) |
Reads one XML element from a file and parses it. | |
void | parse (istream &reader) |
Reads one XML element from a stream and parses it. | |
void | removeChild (XMLElement &child) |
Removes a child element. | |
list< XMLElement > * | getChildren () |
Returns the child elements as a Vector. | |
string | getStringAttribute (string &name) |
Returns an attribute of the element. | |
string | getStringAttribute (string &name, string &defaultValue) |
Returns an attribute of the element. | |
int | getIntAttribute (string &name) |
Returns an attribute of the element. | |
int | getIntAttribute (string &name, int defaultValue) |
Returns an attribute of the element. | |
double | getDoubleAttribute (string &name) |
Returns an attribute of the element. | |
double | getDoubleAttribute (string &name, double defaultValue) |
Returns an attribute of the element. | |
bool | getBooleanAttribute (string &name, string &trueValue, string &falseValue, bool defaultValue) |
Returns an attribute of the element. | |
void | removeAttribute (string &name) |
Removes an attribute. | |
void | setContent (string &content) |
Changes the content string. | |
string | getContent () |
Returns the PCDATA content of the object. | |
string | getName () |
Returns the name of the element. | |
void | setName (string &name) |
Changes the name of the element. | |
int | getLineNr () |
Returns the line number in the source data on which the element is found. | |
void | singleLineWriter (ostream &writer) |
Writes the XML element to an output stream as a single line. | |
void | write (string &file) |
Writes the XML element to a file using a pretty format. | |
void | prettyWriter (ostream &writer) |
Writes the XML element to an output stream using a pretty format. | |
void | operator= (XMLElement &rhs) |
Sets two objects equal to one another. | |
bool | operator== (XMLElement &rhs) |
Determines if two objects equal to one another. | |
Private Member Functions | |
XMLElement (map< string, string > *entities, bool skipLeadingWhitespace, bool fillBasicConversionTable) | |
Creates and initializes a new XML element. | |
void | initialize (bool skipLeadingWhitespace, bool fillBasicConversionTable) |
Initializes a new XML element. | |
void | initialize (map< string, string > *entities, bool skipLeadingWhitespace, bool fillBasicConversionTable) |
Initializes a new XML element. | |
void | parse (istream &reader, int startingLineNr) |
Reads one XML element from a stream and parses it. | |
void | scanIdentifier (string &result) |
Scans an identifier from the current stream. | |
unsigned char | scanWhitespace () |
This method scans an identifier from the current stream. | |
unsigned char | scanWhitespace (string &result) |
This method scans an identifier from the current stream. | |
void | scanString (string &str) |
This method scans a delimited string from the current stream. | |
void | scanPCData (string &data) |
Scans a PCDATA element. | |
void | scanElement (XMLElement &elt) |
Scans an XML element. | |
bool | checkCDATA (string &buf) |
Scans a special tag and if the tag is a CDATA section, append its content to buf . | |
void | skipComment () |
Skips a comment. | |
void | skipSpecialTag (int bracketLevel) |
Skips a special tag or comment. | |
bool | checkLiteral (string literal) |
Scans the data for literal text. | |
void | resolveEntity (string &buf) |
Resolves an entity. | |
unsigned char | readChar () |
Reads a character from a stream. | |
void | unreadChar (unsigned char ch) |
Pushes a character back to the read-back buffer. | |
XMLElement | createAnotherElement () |
Creates a new similar XML element. | |
void | indent (ostream &writer, int depth) |
Provides the proper indentation spacing when pretty printing an element depth deep in the XML tree. | |
void | prettyWriter (ostream &writer, int depth) |
Writes the XML element to an output stream using a pretty format. | |
void | writeEncoded (ostream &writer, string &str) |
Writes a string encoded to a stream. | |
XMLParseException | invalidValueSet (string name) |
Creates a parse exception for when an invalid valueset is given to a method. | |
XMLParseException | invalidValue (string name, string value) |
Creates a parse exception for when an invalid value is given to a method. | |
XMLParseException | unexpectedEndOfData () |
Creates a parse exception for when the end of the data input has been reached. | |
XMLParseException | syntaxError (string context) |
Creates a parse exception for when a syntax error occured. | |
XMLParseException | unicodeError (int value) |
Creates a parse exception for when an unsupported unicode value is encountered. | |
XMLParseException | expectedInput (string charSet) |
Creates a parse exception for when the next character read is not the character that was expected. | |
XMLParseException | unknownEntity (string name) |
Creates a parse exception for when an entity could not be resolved. | |
Private Attributes | |
map< string, string > | attributes |
The attributes given to the element. | |
list< XMLElement > | children |
Child elements of the element. | |
string | name |
The name of the element. | |
string | contents |
The PCDATA content of the object. | |
map< string, string > * | entities |
Conversion table for "&...;" entities. | |
map< string, string > | entitiesInstance |
A concrete instance of the entities conversion table. | |
int | lineNr |
The line number where the element starts. | |
int | parserLineNr |
The current line number in the source content. | |
unsigned char | charReadTooMuch |
Character read too much. | |
istream * | reader |
The input stream provided by the caller of the parse method. | |
bool | ignoreWhitespace |
true if the leading and trailing whitespace of PCDATA sections have to be ignored. |
The object is able to parse and write XML code.
Definition at line 32 of file XMLElement.h.
XMLElement::XMLElement | ( | ) |
Creates and initializes a new XML element.
A basic entity ("&", etc.) conversion table is used and leading whitespace is not skipped.
Definition at line 15 of file XMLElement.cpp.
References initialize().
Referenced by createAnotherElement().
XMLElement::XMLElement | ( | map< string, string > * | entities | ) |
Creates and initializes a new XML element.
A basic entity ("&", etc.) conversion table and the provided entity conversion table are used and leading whitespace is not skipped.
entities | The entity conversion table. |
Definition at line 21 of file XMLElement.cpp.
References initialize().
XMLElement::XMLElement | ( | bool | skipLeadingWhitespace | ) |
Creates and initializes a new XML element.
A basic entity ("&", etc.) conversion table is used and skipping of leading whitespace is controled by skipLeadingWhitespace
.
skipLeadingWhitespace | true if leading and trailing whitespace in PCDATA content has to be removed. |
Definition at line 27 of file XMLElement.cpp.
References initialize().
XMLElement::XMLElement | ( | map< string, string > * | entities, | |
bool | skipLeadingWhitespace | |||
) |
Creates and initializes a new XML element.
A basic entity ("&", etc.) conversion table and the provided entity conversion table are used and leading whitespace is controled by skipLeadingWhitespace
.
entities | The entity conversion table. | |
skipLeadingWhitespace | true if leading and trailing whitespace in PCDATA content has to be removed. |
Definition at line 33 of file XMLElement.cpp.
References initialize().
XMLElement::XMLElement | ( | map< string, string > * | entities, | |
bool | skipLeadingWhitespace, | |||
bool | fillBasicConversionTable | |||
) | [private] |
Creates and initializes a new XML element.
A basic entity ("&", etc.) conversion table can be provided by setting fillBasicConversionTable
to true
. The provided entity conversion table is used and skipping leading whitespace is controled by skipLeadingWhitespace
.
This constructor should only be called from createAnotherElement to create child elements.
entities | The entity conversion table. | |
skipLeadingWhitespace | true if leading and trailing whitespace in PCDATA content has to be removed. | |
fillBasicConversionTable | true if the basic entities need to be added to the entity list. |
Definition at line 40 of file XMLElement.cpp.
References initialize().
void XMLElement::initialize | ( | bool | skipLeadingWhitespace, | |
bool | fillBasicConversionTable | |||
) | [private] |
Initializes a new XML element.
skipLeadingWhitespace | true if leading and trailing whitespace in PCDATA content has to be removed. | |
fillBasicConversionTable | true if the basic entities need to be added to the entity list. |
Definition at line 48 of file XMLElement.cpp.
References entitiesInstance.
Referenced by XMLElement().
void XMLElement::initialize | ( | map< string, string > * | entities, | |
bool | skipLeadingWhitespace, | |||
bool | fillBasicConversionTable | |||
) | [private] |
Initializes a new XML element.
entities | The entity conversion table. | |
skipLeadingWhitespace | true if leading and trailing whitespace in PCDATA content has to be removed. | |
fillBasicConversionTable | true if the basic entities need to be added to the entity list. |
Definition at line 55 of file XMLElement.cpp.
References contents, ignoreWhitespace, and lineNr.
int XMLElement::countChildren | ( | ) |
Returns the number of child elements of the element.
Definition at line 88 of file XMLElement.cpp.
References children.
void XMLElement::addChild | ( | XMLElement & | child | ) |
Adds a child element.
child | The child element to add. |
Definition at line 93 of file XMLElement.cpp.
References children.
Referenced by scanElement().
void XMLElement::setAttribute | ( | string & | name, | |
string & | value | |||
) |
Adds or modifies an attribute.
name | The name of the attribute. | |
value | The value of the attribute. |
Definition at line 99 of file XMLElement.cpp.
References attributes.
Referenced by scanElement().
void XMLElement::setAttribute | ( | string & | name, | |
int | value | |||
) |
Adds or modifies an attribute.
name | The name of the attribute. | |
value | The value of the attribute. |
Definition at line 105 of file XMLElement.cpp.
References attributes, and StringManipulation::intToString().
void XMLElement::setAttribute | ( | string & | name, | |
double | value | |||
) |
Adds or modifies an attribute.
name | The name of the attribute. | |
value | The value of the attribute. |
Definition at line 111 of file XMLElement.cpp.
References attributes, and StringManipulation::doubleToString().
void XMLElement::parse | ( | string & | file | ) |
Reads one XML element from a file and parses it.
file | The file from which to retrieve the XML data. |
XMLParseException | If an error occured while parsing the read data. |
Definition at line 116 of file XMLElement.cpp.
References reader.
Referenced by parse().
void XMLElement::parse | ( | istream & | reader | ) |
Reads one XML element from a stream and parses it.
reader | The stream from which to retrieve the XML data. |
XMLParseException | If an error occured while parsing the read data. |
Definition at line 124 of file XMLElement.cpp.
References parse().
void XMLElement::parse | ( | istream & | reader, | |
int | startingLineNr | |||
) | [private] |
Reads one XML element from a stream and parses it.
reader | The stream from which to retrieve the XML data. | |
startingLineNr | The line number of the first line in the data. |
XMLParseException | If an error occured while parsing the read data. |
Definition at line 129 of file XMLElement.cpp.
References charReadTooMuch, expectedInput(), parserLineNr, readChar(), scanElement(), scanWhitespace(), skipSpecialTag(), and unreadChar().
void XMLElement::removeChild | ( | XMLElement & | child | ) |
Removes a child element.
child | The child element to remove. |
Definition at line 159 of file XMLElement.cpp.
References children.
list< XMLElement > * XMLElement::getChildren | ( | ) |
Returns the child elements as a Vector.
It is safe to modify this Vector.
Definition at line 202 of file XMLElement.cpp.
References children.
string XMLElement::getStringAttribute | ( | string & | name | ) |
Returns an attribute of the element.
If the attribute doesn't exist, an empty string is returned.
name | The name of the attribute. |
Definition at line 209 of file XMLElement.cpp.
string XMLElement::getStringAttribute | ( | string & | name, | |
string & | defaultValue | |||
) |
Returns an attribute of the element.
If the attribute doesn't exist, defaultValue
is returned.
name | The name of the attribute. | |
defaultValue | Key to use if the attribute is missing. |
Definition at line 216 of file XMLElement.cpp.
References attributes.
int XMLElement::getIntAttribute | ( | string & | name | ) |
Returns an attribute of the element.
If the attribute doesn't exist, 0
is returned.
name | The name of the attribute. |
Definition at line 230 of file XMLElement.cpp.
int XMLElement::getIntAttribute | ( | string & | name, | |
int | defaultValue | |||
) |
Returns an attribute of the element.
If the attribute doesn't exist, defaultValue
is returned.
name | The name of the attribute. | |
defaultValue | Key to use if the attribute is missing. |
Definition at line 236 of file XMLElement.cpp.
References attributes, and StringManipulation::stringToInt().
double XMLElement::getDoubleAttribute | ( | string & | name | ) |
Returns an attribute of the element.
If the attribute doesn't exist, 0.0
is returned.
name | The name of the attribute. |
Definition at line 252 of file XMLElement.cpp.
double XMLElement::getDoubleAttribute | ( | string & | name, | |
double | defaultValue | |||
) |
Returns an attribute of the element.
If the attribute doesn't exist, defaultValue
is returned.
name | The name of the attribute. | |
defaultValue | Key to use if the attribute is missing. |
Definition at line 258 of file XMLElement.cpp.
References attributes, and StringManipulation::stringToDouble().
bool XMLElement::getBooleanAttribute | ( | string & | name, | |
string & | trueValue, | |||
string & | falseValue, | |||
bool | defaultValue | |||
) |
Returns an attribute of the element.
If the attribute doesn't exist, defaultValue
is returned. If the value of the attribute is equal to trueValue
, true
is returned. If the value of the attribute is equal to falseValue
, false
is returned. If the value doesn't match trueValue
or falseValue
, an exception is thrown.
name | The name of the attribute. | |
trueValue | The value associated with true . | |
falseValue | The value associated with true . | |
defaultValue | Value to use if the attribute is missing. |
XMLParseException | If the value doesn't match trueValue or falseValue . |
Definition at line 274 of file XMLElement.cpp.
References attributes, and invalidValue().
void XMLElement::removeAttribute | ( | string & | name | ) |
Removes an attribute.
name | The name of the attribute. |
Definition at line 172 of file XMLElement.cpp.
References attributes.
void XMLElement::setContent | ( | string & | content | ) |
Changes the content string.
content | The new content string. |
Definition at line 177 of file XMLElement.cpp.
References contents.
Referenced by scanElement().
string XMLElement::getContent | ( | ) |
Returns the PCDATA content of the object.
If there is no such content, an empty string is returned.
Definition at line 182 of file XMLElement.cpp.
References contents.
string XMLElement::getName | ( | ) |
Returns the name of the element.
Definition at line 187 of file XMLElement.cpp.
References name.
Referenced by expectedInput(), invalidValue(), syntaxError(), unexpectedEndOfData(), unicodeError(), and unknownEntity().
void XMLElement::setName | ( | string & | name | ) |
Changes the name of the element.
name | The new name. |
Definition at line 192 of file XMLElement.cpp.
Referenced by scanElement().
int XMLElement::getLineNr | ( | ) |
Returns the line number in the source data on which the element is found.
This method returns 0
there is no associated source data.
Definition at line 197 of file XMLElement.cpp.
References lineNr.
void XMLElement::scanIdentifier | ( | string & | result | ) | [private] |
Scans an identifier from the current stream.
The scanned identifier is appended to result
.
result | The buffer in which the scanned identifier will be put. |
Definition at line 301 of file XMLElement.cpp.
References readChar(), and unreadChar().
Referenced by scanElement().
unsigned char XMLElement::scanWhitespace | ( | ) | [private] |
This method scans an identifier from the current stream.
Definition at line 319 of file XMLElement.cpp.
References readChar().
Referenced by parse(), and scanElement().
unsigned char XMLElement::scanWhitespace | ( | string & | result | ) | [private] |
This method scans an identifier from the current stream.
The scanned whitespace is appended to result
.
result | Buffer to which the scanned whitespace is appended. |
Definition at line 339 of file XMLElement.cpp.
References readChar().
void XMLElement::scanString | ( | string & | str | ) | [private] |
This method scans a delimited string from the current stream.
The scanned string without delimiters is appended to str
.
str | Buffer to which a scaned delimited string is added. |
Definition at line 360 of file XMLElement.cpp.
References expectedInput(), readChar(), and resolveEntity().
Referenced by scanElement().
void XMLElement::scanPCData | ( | string & | data | ) | [private] |
Scans a PCDATA element.
CDATA sections and entities are resolved. The next < char is skipped. The scanned data is appended to data
.
data | Scaned PCDATA is added to this buffer. |
Definition at line 389 of file XMLElement.cpp.
References checkCDATA(), readChar(), resolveEntity(), and unreadChar().
Referenced by scanElement().
void XMLElement::scanElement | ( | XMLElement & | elt | ) | [private] |
Scans an XML element.
elt | The element that will contain the result. |
Definition at line 490 of file XMLElement.cpp.
References addChild(), checkCDATA(), checkLiteral(), createAnotherElement(), expectedInput(), name, readChar(), scanIdentifier(), scanPCData(), scanString(), scanWhitespace(), setAttribute(), setContent(), setName(), skipComment(), and unreadChar().
Referenced by parse().
bool XMLElement::checkCDATA | ( | string & | buf | ) | [private] |
Scans a special tag and if the tag is a CDATA section, append its content to buf
.
buf | Buffer to add scaned data to. |
Definition at line 421 of file XMLElement.cpp.
References checkLiteral(), readChar(), skipSpecialTag(), and unreadChar().
Referenced by scanElement(), and scanPCData().
void XMLElement::skipComment | ( | ) | [private] |
Skips a comment.
Definition at line 640 of file XMLElement.cpp.
References expectedInput(), and readChar().
Referenced by scanElement(), and skipSpecialTag().
void XMLElement::skipSpecialTag | ( | int | bracketLevel | ) | [private] |
Skips a special tag or comment.
bracketLevel | The number of open square brackets ([) that have already been read. |
Definition at line 666 of file XMLElement.cpp.
References readChar(), and skipComment().
Referenced by checkCDATA(), and parse().
bool XMLElement::checkLiteral | ( | string | literal | ) | [private] |
Scans the data for literal text.
Scanning stops when a character does not match or after the complete text has been checked, whichever comes first.
literal | the literal to check. |
Definition at line 745 of file XMLElement.cpp.
References readChar().
Referenced by checkCDATA(), and scanElement().
void XMLElement::resolveEntity | ( | string & | buf | ) | [private] |
Resolves an entity.
The name of the entity is read from the current stream. The value of the entity is appended to buf
.
buf | Where to put the entity value. |
Definition at line 760 of file XMLElement.cpp.
References entities, StringManipulation::hexstringToInt(), readChar(), StringManipulation::stringToInt(), unicodeError(), and unknownEntity().
Referenced by scanPCData(), and scanString().
unsigned char XMLElement::readChar | ( | ) | [private] |
Reads a character from a stream.
Definition at line 818 of file XMLElement.cpp.
References charReadTooMuch, parserLineNr, reader, and unexpectedEndOfData().
Referenced by checkCDATA(), checkLiteral(), parse(), resolveEntity(), scanElement(), scanIdentifier(), scanPCData(), scanString(), scanWhitespace(), skipComment(), and skipSpecialTag().
void XMLElement::unreadChar | ( | unsigned char | ch | ) | [private] |
Pushes a character back to the read-back buffer.
ch | The character to push back. |
Definition at line 846 of file XMLElement.cpp.
References charReadTooMuch.
Referenced by checkCDATA(), parse(), scanElement(), scanIdentifier(), and scanPCData().
XMLElement XMLElement::createAnotherElement | ( | ) | [private] |
Creates a new similar XML element.
You should override this method when subclassing XMLElement.
Definition at line 852 of file XMLElement.cpp.
References entities, ignoreWhitespace, and XMLElement().
Referenced by scanElement().
void XMLElement::singleLineWriter | ( | ostream & | writer | ) |
Writes the XML element to an output stream as a single line.
writer | The stream to write the XML data to. |
Definition at line 858 of file XMLElement.cpp.
References attributes, contents, name, and writeEncoded().
void XMLElement::indent | ( | ostream & | writer, | |
int | depth | |||
) | [private] |
Provides the proper indentation spacing when pretty printing an element depth deep in the XML tree.
writer | The stream to write the XML data to. | |
depth | Depth to indent to. |
Definition at line 914 of file XMLElement.cpp.
void XMLElement::write | ( | string & | file | ) |
Writes the XML element to a file using a pretty format.
file | The file to write the XML data to. |
Definition at line 922 of file XMLElement.cpp.
void XMLElement::prettyWriter | ( | ostream & | writer | ) |
Writes the XML element to an output stream using a pretty format.
writer | The stream to write the XML data to. |
Definition at line 929 of file XMLElement.cpp.
void XMLElement::prettyWriter | ( | ostream & | writer, | |
int | depth | |||
) | [private] |
Writes the XML element to an output stream using a pretty format.
The indentation begins depth deep.
writer | The stream to write the XML data to. | |
depth | Depth to begin indentation at. |
Definition at line 934 of file XMLElement.cpp.
void XMLElement::writeEncoded | ( | ostream & | writer, | |
string & | str | |||
) | [private] |
Writes a string encoded to a stream.
writer | The stream to write the XML data to. | |
str | The string to write encoded. |
Definition at line 996 of file XMLElement.cpp.
Referenced by singleLineWriter().
void XMLElement::operator= | ( | XMLElement & | rhs | ) |
Sets two objects equal to one another.
rhs | object to set this object equal to. |
Definition at line 1037 of file XMLElement.cpp.
bool XMLElement::operator== | ( | XMLElement & | rhs | ) |
Determines if two objects equal to one another.
rhs | object to determine if this one is equal to. |
true
if both objects are equal and false
otherwise. Definition at line 1063 of file XMLElement.cpp.
XMLParseException XMLElement::invalidValueSet | ( | string | name | ) | [private] |
Creates a parse exception for when an invalid valueset is given to a method.
name | The name of the entity. |
Definition at line 1099 of file XMLElement.cpp.
XMLParseException XMLElement::invalidValue | ( | string | name, | |
string | value | |||
) | [private] |
Creates a parse exception for when an invalid value is given to a method.
name | The name of the entity. | |
value | The value of the entity. |
Definition at line 1106 of file XMLElement.cpp.
References getName(), and parserLineNr.
Referenced by getBooleanAttribute().
XMLParseException XMLElement::unexpectedEndOfData | ( | ) | [private] |
Creates a parse exception for when the end of the data input has been reached.
Definition at line 1115 of file XMLElement.cpp.
References getName(), and parserLineNr.
Referenced by readChar().
XMLParseException XMLElement::syntaxError | ( | string | context | ) | [private] |
Creates a parse exception for when a syntax error occured.
context | The context in which the error occured. |
Definition at line 1122 of file XMLElement.cpp.
References getName(), and parserLineNr.
XMLParseException XMLElement::unicodeError | ( | int | value | ) | [private] |
Creates a parse exception for when an unsupported unicode value is encountered.
value | integer value of the unsupported unicode representation. |
Definition at line 1128 of file XMLElement.cpp.
References getName(), StringManipulation::intToHexString(), StringManipulation::intToString(), and parserLineNr.
Referenced by resolveEntity().
XMLParseException XMLElement::expectedInput | ( | string | charSet | ) | [private] |
Creates a parse exception for when the next character read is not the character that was expected.
charSet | The set of characters (in human readable form) that was expected. |
Definition at line 1140 of file XMLElement.cpp.
References getName(), and parserLineNr.
Referenced by parse(), scanElement(), scanString(), and skipComment().
XMLParseException XMLElement::unknownEntity | ( | string | name | ) | [private] |
Creates a parse exception for when an entity could not be resolved.
name | The name of the entity. |
Definition at line 1147 of file XMLElement.cpp.
References getName(), and parserLineNr.
Referenced by resolveEntity().
map<string,string> XMLElement::attributes [private] |
The attributes given to the element.
Definition at line 37 of file XMLElement.h.
Referenced by getBooleanAttribute(), getDoubleAttribute(), getIntAttribute(), getStringAttribute(), removeAttribute(), setAttribute(), and singleLineWriter().
list<XMLElement> XMLElement::children [private] |
Child elements of the element.
Definition at line 42 of file XMLElement.h.
Referenced by addChild(), countChildren(), getChildren(), and removeChild().
string XMLElement::name [private] |
The name of the element.
Definition at line 47 of file XMLElement.h.
Referenced by getName(), scanElement(), and singleLineWriter().
string XMLElement::contents [private] |
The PCDATA content of the object.
Definition at line 53 of file XMLElement.h.
Referenced by getContent(), initialize(), setContent(), and singleLineWriter().
map<string,string>* XMLElement::entities [private] |
Conversion table for "&...;" entities.
The keys are the entity names without the & and ; delimiters.
Definition at line 60 of file XMLElement.h.
Referenced by createAnotherElement(), and resolveEntity().
map<string,string> XMLElement::entitiesInstance [private] |
A concrete instance of the entities conversion table.
If the object is constructed without providing a value for entities, this will be used. By doing it this way, some speed and memory usage are sacrificed, but it takes care of it's own memory deallocation.
Definition at line 68 of file XMLElement.h.
Referenced by initialize().
int XMLElement::lineNr [private] |
The line number where the element starts.
Definition at line 74 of file XMLElement.h.
Referenced by getLineNr(), and initialize().
int XMLElement::parserLineNr [private] |
The current line number in the source content.
Definition at line 79 of file XMLElement.h.
Referenced by expectedInput(), invalidValue(), parse(), readChar(), syntaxError(), unexpectedEndOfData(), unicodeError(), and unknownEntity().
unsigned char XMLElement::charReadTooMuch [private] |
Character read too much.
This character provides push-back functionality to the input stream without having to use a pushback stream. If there is no such character, this field is ''.
Definition at line 87 of file XMLElement.h.
Referenced by parse(), readChar(), and unreadChar().
istream* XMLElement::reader [private] |
The input stream provided by the caller of the parse method.
Definition at line 92 of file XMLElement.h.
Referenced by parse(), and readChar().
bool XMLElement::ignoreWhitespace [private] |
true
if the leading and trailing whitespace of PCDATA sections have to be ignored.
Definition at line 99 of file XMLElement.h.
Referenced by createAnotherElement(), and initialize().