XMLParser consumes characters from an XMLInputStream object, parsing the XML and using a TreeBuildingXMLHandler to construct an XMLObject.
More...
#include <Teuchos_XMLParser.hpp>
|
| void | getETag (std::string &tag) |
| | Consume a ETag production according to the XML specification. getETag throws an std::exception if the input does not match the production rule. More...
|
| |
| void | getSTag (unsigned char lookahead, std::string &tag, Teuchos::map< std::string, string > &attrs, bool &emptytag) |
| | Consume a STag production according to the XML specification. getSTag throws an std::exception if the input does not match the production rule. More...
|
| |
| void | getComment (long startLine) |
| | Consume a Comment production according to the XML specification. getComment throws an std::exception if the input does not match the production rule. More...
|
| |
| int | getSpace (unsigned char &lookahead) |
| | Consumes a Space (block of whitepace) production according to the XML specification. More...
|
| |
| void | getReference (std::string &refstr) |
| | Consumes a Reference production according to the XML specification. More...
|
| |
| void | ignoreXMLDeclaration () |
| | Ignore the rest of an XML declaration tag. More...
|
| |
| int | assertChar (unsigned char cexp) |
| | Determines if the next character on the stream. More...
|
| |
|
| static bool | isLetter (unsigned char c) |
| | Determine whether c matches the Letter production according to the XML specification. More...
|
| |
| static bool | isNameChar (unsigned char c) |
| | Determine whether c matches the NameChar production according to the XML specification. More...
|
| |
| static bool | isChar (unsigned char c) |
| | Determine whether c matches the Char production according to the XML specification. More...
|
| |
| static bool | isSpace (unsigned char c) |
| | Determine whether c matches the Space production according to the XML specification. More...
|
| |
XMLParser consumes characters from an XMLInputStream object, parsing the XML and using a TreeBuildingXMLHandler to construct an XMLObject.
Note: per the XML standard, certain characters must be represented with escape codes within fields:
character description code
< less-than <
& ampersand &
Definition at line 70 of file Teuchos_XMLParser.hpp.
| Teuchos::XMLParser::~XMLParser |
( |
| ) |
|
|
inline |
| bool XMLParser::isLetter |
( |
unsigned char |
c | ) |
|
|
inlinestaticprivate |
Determine whether c matches the Letter production according to the XML specification.
Definition at line 556 of file Teuchos_XMLParser.cpp.
| bool XMLParser::isNameChar |
( |
unsigned char |
c | ) |
|
|
inlinestaticprivate |
Determine whether c matches the NameChar production according to the XML specification.
Definition at line 567 of file Teuchos_XMLParser.cpp.
| bool XMLParser::isChar |
( |
unsigned char |
c | ) |
|
|
inlinestaticprivate |
Determine whether c matches the Char production according to the XML specification.
Definition at line 586 of file Teuchos_XMLParser.cpp.
| bool XMLParser::isSpace |
( |
unsigned char |
c | ) |
|
|
inlinestaticprivate |
Determine whether c matches the Space production according to the XML specification.
Definition at line 577 of file Teuchos_XMLParser.cpp.
| void XMLParser::getETag |
( |
std::string & |
tag | ) |
|
|
private |
Consume a ETag production according to the XML specification. getETag throws an std::exception if the input does not match the production rule.
- Parameters
-
| tag | [out] On output, will be set to the tag name of the closing tag. |
Definition at line 260 of file Teuchos_XMLParser.cpp.
| void XMLParser::getSTag |
( |
unsigned char |
lookahead, |
|
|
std::string & |
tag, |
|
|
Teuchos::map< std::string, string > & |
attrs, |
|
|
bool & |
emptytag |
|
) |
| |
|
private |
Consume a STag production according to the XML specification. getSTag throws an std::exception if the input does not match the production rule.
- Parameters
-
| lookahead | [in] Contains the first character of the tag name. |
| tag | [out] On output, will be set to the tag name of the opening tag. |
| attrs | [out] On output, contains the attributes of the tag. |
| emptytag | [out] On output, specifies if this was an empty element tag. |
Definition at line 300 of file Teuchos_XMLParser.cpp.
| void XMLParser::getComment |
( |
long |
startLine | ) |
|
|
private |
Consume a Comment production according to the XML specification. getComment throws an std::exception if the input does not match the production rule.
Definition at line 445 of file Teuchos_XMLParser.cpp.
| int XMLParser::getSpace |
( |
unsigned char & |
lookahead | ) |
|
|
private |
Consumes a Space (block of whitepace) production according to the XML specification.
- Parameters
-
| lookahead | [out] On output, specifies the first character after the whitespace. |
- Returns
- Returns non-zero if the input stream was exhausted while reading whitespace.
Definition at line 543 of file Teuchos_XMLParser.cpp.
| void XMLParser::getReference |
( |
std::string & |
refstr | ) |
|
|
private |
Consumes a Reference production according to the XML specification.
- Parameters
-
| refstr | [out] On output, specifies the decoded reference. |
Definition at line 479 of file Teuchos_XMLParser.cpp.
| void XMLParser::ignoreXMLDeclaration |
( |
| ) |
|
|
private |
| int XMLParser::assertChar |
( |
unsigned char |
cexp | ) |
|
|
private |
Determines if the next character on the stream.
- Parameters
-
| cexp | [in] The expected character. |
- Returns
- Returns non-zero if the next character on the stream is not
cexp.
Definition at line 594 of file Teuchos_XMLParser.cpp.
| Teuchos::map<std::string,string> Teuchos::XMLParser::_entities |
|
private |
| long Teuchos::XMLParser::_lineNo |
|
private |
The documentation for this class was generated from the following files: