// XmlParser.cpp // // This class implements pretty simplistic XML parser routines. // #include "Net7.h" #include "XmlParser.h" #include "XmlTags.h" XmlParser::XmlParser() { m_Success = true; } XmlParser::~XmlParser() { } bool XmlParser::ParseXmlTag(char **buffer) { char *tag = m_Tag; char *attributes = m_Attributes; bool success = false; char *p = *buffer; *tag = '\0'; *attributes = '\0'; m_XmlTagID = XML_TAG_ID_INVALID; // Skip data until we reach the beginning of the tag or the end of the string bool done = false; while (!done) { // Skip forward until we find the '<' or reach the end of the buffer while ((*p != '\0') && (*p != '<')) { p++; } // Bail out if we have reached the end of the buffer if (*p == '\0') { return (false); } // Skip the '<' p++; // If this is a valid tag, stop the search // This procedure ignores closing tags // (i.e. "") and comments (i.e. "