13#ifndef ASCIIXMLPARSER_HPP_
14#define ASCIIXMLPARSER_HPP_
80 std::map< std::string, std::string >
const&
82 std::pair< int, int >
const&
99 static std::pair< std::string, std::string >
const piDelimiter;
144 recordTo( std::string& recordingString,
145 char const endChar );
195 std::pair< std::string, std::string >
const& delimitingStrings );
204 std::pair< std::string, std::string >
const& delimitingStrings );
264 <<
"BOL::error! AsciiXmlParser::readAllOfRootElementOfFile( " << fileName
265 <<
" ) could not find a well-formed root element!";
266 std::cout << std::endl;
324 inline std::string
const&
332 std::string
const& comparisonString )
const
334 return ( 0 ==
elementName.compare( comparisonString ) );
337 inline std::string
const&
350 inline std::string
const&
356 inline std::map< std::string, std::string >
const&
362 inline std::pair< int, int >
const&
422 recordingString.append( 1,
509 std::string
const& comparisonString )
const
513 return ( 0 == comparisonString.compare( 1,
514 ( comparisonString.size() - 1 ),
517 ( comparisonString.size() - 1 ) ) );
525 return ( 0 == comparisonString.compare( 0,
526 ( comparisonString.size() - 1 ),
528 ( markupString.size() - comparisonString.size() + 1 ),
529 ( comparisonString.size() - 1 ) ) );
537 recordingString.append( 1,
540 recordingString.append( 1,
557 <<
"BOL::error! AsciiXmlParser::parseOpeningTag(...) found empty"
559 std::cout << std::endl;
void returnToBeginningOfText()
bool parseTagName(std::string &nameDestination)
bool discardToNextMarkup()
bool recordToNextMarkup()
std::map< std::string, std::string > elementAttributeMap
std::string currentTagName
static std::pair< std::string, std::string > const piDelimiter
static std::pair< std::string, std::string > const doctypeDelimiter
bool recordDelimited(std::pair< std::string, std::string > const &delimitingStrings)
bool closeMarkup(size_t const startPosition=0)
bool ignoreDelimited(std::pair< std::string, std::string > const &delimitingStrings)
std::string fullElementContentAsFound
std::pair< int, int > const & getLineRangeOfCurrentElement() const
bool compareMarkupEnd(std::string const &comparisonString) const
bool recordTo(std::string &recordingString, char const endChar)
std::ifstream fileParsingStream
static std::pair< std::string, std::string > const cdataDelimiter
static char const markupOpener
std::map< std::string, std::string > const & getCurrentElementAttributes()
std::string const & getCurrentOpeningTagAsFound() const
std::pair< int, int > rootLineRange
bool eraseQuotedStringsInMarkup(size_t const startPosition)
std::string fullOpeningTagAsFound
bool compareMarkupStart(std::string const &comparisonString) const
static std::string const allowedXmlWhitespaceChars
bool loadString(std::string const stringToParse)
static char const markupCloser
std::pair< std::string, std::string > currentAttribute
std::string const & getCurrentElementName() const
void recordTagTo(std::string &recordingString)
std::string const & getCurrentElementContent() const
bool recordToEndOfElement()
bool currentElementNameMatches(std::string const &comparisonString) const
std::string getTrimmedCurrentElementContent() const
bool openRootElementOfFile(std::string const &fileName)
bool readAllOfRootElementOfFile(std::string const &fileName)
AsciiXmlParser(bool const isVerbose=false)
static std::string const allowedXmlQuoteChars
static char const tagCloser
std::istream * textStream
bool skipPrologAndOpenRootElement()
std::istringstream stringParsingStream
std::map< std::string, std::string > rootAttributeMap
std::pair< int, int > elementLineRange
static std::pair< std::string, std::string > const commentDelimiter
static std::string trimFromFrontAndBack(std::string const &stringToTrim, std::string const &charsToTrim=whitespaceAndNewlineChars)