#include <AsciiXmlParser.hpp>
Definition at line 29 of file AsciiXmlParser.hpp.
◆ AsciiXmlParser()
BOL::AsciiXmlParser::AsciiXmlParser |
( |
bool const |
isVerbose = false | ) |
|
Definition at line 36 of file AsciiXmlParser.cpp.
std::map< std::string, std::string > elementAttributeMap
std::string currentTagName
std::string fullElementContentAsFound
std::ifstream fileParsingStream
std::pair< int, int > rootLineRange
std::string fullOpeningTagAsFound
std::pair< std::string, std::string > currentAttribute
std::istream * textStream
std::istringstream stringParsingStream
std::map< std::string, std::string > rootAttributeMap
std::pair< int, int > elementLineRange
◆ ~AsciiXmlParser()
BOL::AsciiXmlParser::~AsciiXmlParser |
( |
| ) |
|
◆ closeFile()
void BOL::AsciiXmlParser::closeFile |
( |
| ) |
|
|
inline |
◆ closeMarkup()
bool BOL::AsciiXmlParser::closeMarkup |
( |
size_t const |
startPosition = 0 | ) |
|
|
protected |
Definition at line 116 of file AsciiXmlParser.cpp.
136 <<
"BOL::error! AsciiXmlParser::closeMarkup( " << startPosition
137 <<
" ) could not find the end of a markup!";
138 std::cout << std::endl;
149 while( std::string::npos ==
parseEnd )
162 <<
"BOL::error! AsciiXmlParser::closeMarkup( " << startPosition
163 <<
") could not find the end of a markup!";
164 std::cout << std::endl;
bool ignoreDelimited(std::pair< std::string, std::string > const &delimitingStrings)
bool recordTo(std::string &recordingString, char const endChar)
static char const markupCloser
static std::string const allowedXmlQuoteChars
static std::pair< std::string, std::string > const commentDelimiter
◆ compareMarkupEnd()
bool BOL::AsciiXmlParser::compareMarkupEnd |
( |
std::string const & |
comparisonString | ) |
const |
|
inlineprotected |
Definition at line 521 of file AsciiXmlParser.hpp.
525 return ( 0 == comparisonString.compare( 0,
526 ( comparisonString.size() - 1 ),
529 ( comparisonString.size() - 1 ) ) );
◆ compareMarkupStart()
bool BOL::AsciiXmlParser::compareMarkupStart |
( |
std::string const & |
comparisonString | ) |
const |
|
inlineprotected |
Definition at line 508 of file AsciiXmlParser.hpp.
513 return ( 0 == comparisonString.compare( 1,
514 ( comparisonString.size() - 1 ),
517 ( comparisonString.size() - 1 ) ) );
◆ currentElementNameMatches()
bool BOL::AsciiXmlParser::currentElementNameMatches |
( |
std::string const & |
comparisonString | ) |
const |
|
inline |
◆ discardToNextMarkup()
bool BOL::AsciiXmlParser::discardToNextMarkup |
( |
| ) |
|
|
inlineprotected |
Definition at line 429 of file AsciiXmlParser.hpp.
bool closeMarkup(size_t const startPosition=0)
static char const markupOpener
◆ discardToNextTag()
bool BOL::AsciiXmlParser::discardToNextTag |
( |
| ) |
|
|
inlineprotected |
Definition at line 449 of file AsciiXmlParser.hpp.
bool discardToNextMarkup()
static std::pair< std::string, std::string > const piDelimiter
static std::pair< std::string, std::string > const cdataDelimiter
◆ eraseQuotedStringsInMarkup()
bool BOL::AsciiXmlParser::eraseQuotedStringsInMarkup |
( |
size_t const |
startPosition | ) |
|
|
protected |
◆ getCurrentElementAttributes()
std::map< std::string, std::string > const & BOL::AsciiXmlParser::getCurrentElementAttributes |
( |
| ) |
|
|
inline |
◆ getCurrentElementContent()
std::string const & BOL::AsciiXmlParser::getCurrentElementContent |
( |
| ) |
const |
|
inline |
◆ getCurrentElementName()
std::string const & BOL::AsciiXmlParser::getCurrentElementName |
( |
| ) |
const |
|
inline |
◆ getCurrentOpeningTagAsFound()
std::string const & BOL::AsciiXmlParser::getCurrentOpeningTagAsFound |
( |
| ) |
const |
|
inline |
◆ getLineRangeOfCurrentElement()
std::pair< int, int > const & BOL::AsciiXmlParser::getLineRangeOfCurrentElement |
( |
| ) |
const |
|
inline |
◆ getTrimmedCurrentElementContent()
std::string BOL::AsciiXmlParser::getTrimmedCurrentElementContent |
( |
| ) |
const |
|
inline |
Definition at line 344 of file AsciiXmlParser.hpp.
static std::string const allowedXmlWhitespaceChars
static std::string trimFromFrontAndBack(std::string const &stringToTrim, std::string const &charsToTrim=whitespaceAndNewlineChars)
◆ ignoreDelimited()
bool BOL::AsciiXmlParser::ignoreDelimited |
( |
std::pair< std::string, std::string > const & |
delimitingStrings | ) |
|
|
protected |
Definition at line 178 of file AsciiXmlParser.cpp.
201 <<
"BOL::error! AsciiXmlParser::ignoreDelimited( \""
202 << delimitingStrings.first <<
", " << delimitingStrings.second
203 <<
"\" ) could not find the ending delimiter!";
204 std::cout << std::endl;
bool compareMarkupEnd(std::string const &comparisonString) const
bool compareMarkupStart(std::string const &comparisonString) const
◆ loadString()
bool BOL::AsciiXmlParser::loadString |
( |
std::string const |
stringToParse | ) |
|
|
inline |
◆ openRootElementOfFile()
bool BOL::AsciiXmlParser::openRootElementOfFile |
( |
std::string const & |
fileName | ) |
|
Definition at line 79 of file AsciiXmlParser.cpp.
94 <<
"BOL::error! AsciiXmlParser::openRootElementOfFile( " << fileName
95 <<
" ) could not open the file!";
96 std::cout << std::endl;
108 <<
"BOL::error! AsciiXmlParser::openRootElementOfFile( " << fileName
109 <<
" ) could not find a root element!";
110 std::cout << std::endl;
bool skipPrologAndOpenRootElement()
◆ parseAttributes()
bool BOL::AsciiXmlParser::parseAttributes |
( |
| ) |
|
|
protected |
Definition at line 287 of file AsciiXmlParser.cpp.
315 <<
"BOL::error! AsciiXmlParser::parseOpeningTag() found an attribute"
317 <<
"\") without a value!";
318 std::cout << std::endl;
341 <<
"BOL::error! AsciiXmlParser::parseOpeningTag() found an attribute"
343 <<
"\") without a well-formed value (no closing quote mark)!";
344 std::cout << std::endl;
static char const tagCloser
◆ parseTagName()
bool BOL::AsciiXmlParser::parseTagName |
( |
std::string & |
nameDestination | ) |
|
|
inlineprotected |
Definition at line 545 of file AsciiXmlParser.hpp.
557 <<
"BOL::error! AsciiXmlParser::parseOpeningTag(...) found empty"
559 std::cout << std::endl;
◆ readAllOfRootElementOfFile()
bool BOL::AsciiXmlParser::readAllOfRootElementOfFile |
( |
std::string const & |
fileName | ) |
|
|
inline |
Definition at line 248 of file AsciiXmlParser.hpp.
264 <<
"BOL::error! AsciiXmlParser::readAllOfRootElementOfFile( " << fileName
265 <<
" ) could not find a well-formed root element!";
266 std::cout << std::endl;
bool recordToEndOfElement()
bool openRootElementOfFile(std::string const &fileName)
◆ readCharacter()
bool BOL::AsciiXmlParser::readCharacter |
( |
| ) |
|
|
inlineprotected |
◆ readNextElement()
bool BOL::AsciiXmlParser::readNextElement |
( |
| ) |
|
|
inline |
◆ recordDelimited()
bool BOL::AsciiXmlParser::recordDelimited |
( |
std::pair< std::string, std::string > const & |
delimitingStrings | ) |
|
|
protected |
Definition at line 214 of file AsciiXmlParser.cpp.
242 <<
"BOL::error! AsciiXmlParser::ignoreDelimited( \""
243 << delimitingStrings.first <<
", " << delimitingStrings.second
244 <<
"\" ) could not find the ending delimiter!";
245 std::cout << std::endl;
◆ recordTagTo()
void BOL::AsciiXmlParser::recordTagTo |
( |
std::string & |
recordingString | ) |
|
|
inlineprotected |
Definition at line 533 of file AsciiXmlParser.hpp.
537 recordingString.append( 1,
540 recordingString.append( 1,
◆ recordTo()
bool BOL::AsciiXmlParser::recordTo |
( |
std::string & |
recordingString, |
|
|
char const |
endChar |
|
) |
| |
|
inlineprotected |
◆ recordToEndOfElement()
bool BOL::AsciiXmlParser::recordToEndOfElement |
( |
| ) |
|
|
protected |
◆ recordToNextMarkup()
bool BOL::AsciiXmlParser::recordToNextMarkup |
( |
| ) |
|
|
inlineprotected |
◆ recordToNextTag()
bool BOL::AsciiXmlParser::recordToNextTag |
( |
| ) |
|
|
inlineprotected |
Definition at line 485 of file AsciiXmlParser.hpp.
bool recordToNextMarkup()
bool recordDelimited(std::pair< std::string, std::string > const &delimitingStrings)
◆ resetContent()
void BOL::AsciiXmlParser::resetContent |
( |
| ) |
|
|
inlineprotected |
◆ returnToBeginningOfText()
void BOL::AsciiXmlParser::returnToBeginningOfText |
( |
| ) |
|
|
inline |
◆ skipPrologAndOpenRootElement()
bool BOL::AsciiXmlParser::skipPrologAndOpenRootElement |
( |
| ) |
|
|
protected |
Definition at line 418 of file AsciiXmlParser.cpp.
441 <<
"BOL::error! AsciiXmlParser::skipPrologAndOpenRootElement() could"
442 <<
" not find any valid root element tag markup!";
443 std::cout << std::endl;
467 <<
"BOL::error! AsciiXmlParser::skipPrologAndOpenRootElement() could"
468 <<
" not find any valid root element tag markup!";
469 std::cout << std::endl;
474 while( std::string::npos != unclosedSubmarkupOpener )
487 <<
"BOL::error! AsciiXmlParser::skipPrologAndOpenRootElement()"
488 <<
" could not find any valid root element tag markup!";
489 std::cout << std::endl;
494 unclosedSubmarkupOpener );
514 <<
"BOL::error! AsciiXmlParser::skipPrologAndOpenRootElement()"
515 <<
" could not find any valid root element tag markup!";
516 std::cout << std::endl;
535 <<
"BOL::error! AsciiXmlParser::skipPrologAndOpenRootElement() could"
536 <<
" not find any valid root element tag markup!";
537 std::cout << std::endl;
static std::pair< std::string, std::string > const doctypeDelimiter
bool eraseQuotedStringsInMarkup(size_t const startPosition)
◆ allowedXmlQuoteChars
std::string const BOL::AsciiXmlParser::allowedXmlQuoteChars |
|
staticprotected |
◆ allowedXmlWhitespaceChars
std::string const BOL::AsciiXmlParser::allowedXmlWhitespaceChars |
|
staticprotected |
◆ cdataDelimiter
std::pair< std::string, std::string > const BOL::AsciiXmlParser::cdataDelimiter |
|
staticprotected |
◆ closingTag
std::string BOL::AsciiXmlParser::closingTag |
|
protected |
◆ closingTagsToFind
int BOL::AsciiXmlParser::closingTagsToFind |
|
protected |
◆ commentDelimiter
std::pair< std::string, std::string > const BOL::AsciiXmlParser::commentDelimiter |
|
staticprotected |
◆ currentAttribute
std::pair< std::string, std::string > BOL::AsciiXmlParser::currentAttribute |
|
protected |
◆ currentChar
char BOL::AsciiXmlParser::currentChar |
|
protected |
◆ currentQuoteChar
char BOL::AsciiXmlParser::currentQuoteChar |
|
protected |
◆ currentTagName
std::string BOL::AsciiXmlParser::currentTagName |
|
protected |
◆ doctypeDelimiter
std::pair< std::string, std::string > const BOL::AsciiXmlParser::doctypeDelimiter |
|
staticprotected |
◆ elementAttributeMap
std::map< std::string, std::string > BOL::AsciiXmlParser::elementAttributeMap |
|
protected |
◆ elementLineRange
std::pair< int, int > BOL::AsciiXmlParser::elementLineRange |
|
protected |
◆ elementName
std::string BOL::AsciiXmlParser::elementName |
|
protected |
◆ fileParsingStream
std::ifstream BOL::AsciiXmlParser::fileParsingStream |
|
protected |
◆ fullElementContentAsFound
std::string BOL::AsciiXmlParser::fullElementContentAsFound |
|
protected |
◆ fullOpeningTagAsFound
std::string BOL::AsciiXmlParser::fullOpeningTagAsFound |
|
protected |
◆ isVerbose
bool const BOL::AsciiXmlParser::isVerbose |
|
protected |
◆ markupCloser
char const BOL::AsciiXmlParser::markupCloser |
|
staticprotected |
◆ markupOpener
char const BOL::AsciiXmlParser::markupOpener |
|
staticprotected |
◆ markupString
std::string BOL::AsciiXmlParser::markupString |
|
protected |
◆ newlinesBeforeMarkup
int BOL::AsciiXmlParser::newlinesBeforeMarkup |
|
protected |
◆ parseEnd
size_t BOL::AsciiXmlParser::parseEnd |
|
protected |
◆ parseStart
size_t BOL::AsciiXmlParser::parseStart |
|
protected |
◆ piDelimiter
std::pair< std::string, std::string > const BOL::AsciiXmlParser::piDelimiter |
|
staticprotected |
◆ previousLength
size_t BOL::AsciiXmlParser::previousLength |
|
protected |
◆ readNewlines
int BOL::AsciiXmlParser::readNewlines |
|
protected |
◆ rootAttributeMap
std::map< std::string, std::string > BOL::AsciiXmlParser::rootAttributeMap |
|
protected |
◆ rootLineRange
std::pair< int, int > BOL::AsciiXmlParser::rootLineRange |
|
protected |
◆ rootTag
std::string BOL::AsciiXmlParser::rootTag |
|
protected |
◆ streamIsGood
bool BOL::AsciiXmlParser::streamIsGood |
|
protected |
◆ stringParsingStream
std::istringstream BOL::AsciiXmlParser::stringParsingStream |
|
protected |
◆ tagCloser
char const BOL::AsciiXmlParser::tagCloser |
|
staticprotected |
◆ textStream
std::istream* BOL::AsciiXmlParser::textStream |
|
protected |
The documentation for this class was generated from the following files: