#include <xmlParser.h>
Collaboration diagram for XMLNode:
Public Member Functions | |
LPCTSTR | getName () |
LPCTSTR | getText (int i=0) |
int | nText () |
XMLNode | getChildNode (int i=0) |
XMLNode | getChildNode (LPCTSTR name, int i) |
XMLNode | getChildNode (LPCTSTR name, int *i=NULL) |
int | nChildNode (LPCTSTR name) |
int | nChildNode () |
XMLAttribute | getAttribute (int i=0) |
char | isAttributeSet (LPCTSTR name) |
LPCTSTR | getAttribute (LPCTSTR name, int i) |
LPCTSTR | getAttribute (LPCTSTR name, int *i=NULL) |
int | nAttribute () |
XMLClear | getClear (int i=0) |
int | nClear () |
LPTSTR | createXMLString (int nFormat, int *pnSize=NULL) |
XMLNodeContents | enumContents (int i) |
int | nElement () |
char | isEmpty () |
char | isDeclaration () |
~XMLNode () | |
XMLNode (const XMLNode &A) | |
XMLNode & | operator= (const XMLNode &A) |
XMLNode () | |
XMLNode | addChild (LPCTSTR lpszName, int isDeclaration=FALSE) |
void | setName (LPCTSTR lpszName) |
XMLAttribute * | addAttribute (LPCTSTR lpszName, LPCTSTR lpszValuev) |
LPCTSTR | addText (LPCTSTR lpszValue) |
XMLClear * | addClear (LPCTSTR lpszValue, LPCTSTR lpszOpen, LPCTSTR lpszClose) |
XMLNode | addChild (XMLNode nodeToAdd) |
void | deleteNodeContent () |
void | deleteAttribute (int i=0) |
void | deleteAttribute (XMLAttribute *anAttribute) |
void | deleteAttribute (LPCTSTR lpszName) |
void | deleteAttributeRelaxed (LPCTSTR lpszName) |
void | deleteText (int i=0) |
void | deleteText (LPCTSTR lpszValue) |
void | deleteClear (int i=0) |
void | deleteClear (XMLClear *p) |
void | deleteClear (LPCTSTR lpszValue) |
Static Public Member Functions | |
static XMLNode | parseString (LPCTSTR lpszXML, LPCTSTR tag=NULL, XMLResults *pResults=NULL) |
static XMLNode | parseFile (const char *lpszXML, LPCTSTR tag=NULL, XMLResults *pResults=NULL) |
static XMLNode | openFileHelper (const char *lpszXML, LPCTSTR tag) |
static LPCTSTR | getError (XMLError error) |
static XMLNode | createXMLTopNode () |
Static Public Attributes | |
static XMLNode | emptyXMLNode |
static XMLClear | emptyXMLClear = { NULL, NULL, NULL} |
static XMLAttribute | emptyXMLAttribute = { NULL, NULL} |
Protected Types | |
typedef XMLNode::XMLNodeDataTag | XMLNodeData |
Protected Member Functions | |
XMLNode (XMLNodeData *pParent, LPCTSTR lpszName, int isDeclaration) | |
Protected Attributes | |
XMLNodeData * | d |
Private Member Functions | |
int | ParseClearTag (void *pXML, void *pClear) |
int | ParseXMLElement (void *pXML) |
void | addToOrder (int index, int type) |
Static Private Member Functions | |
static void | destroyCurrentBuffer (XMLNodeData *d) |
static int | CreateXMLStringR (XMLNodeData *pEntry, LPTSTR lpszMarker, int nFormat) |
static void * | enumContent (XMLNodeData *pEntry, int i, XMLElementType *nodeType) |
static int | nElement (XMLNodeData *pEntry) |
static void | removeOrderElement (XMLNodeData *d, XMLElementType t, int index) |
static void | exactMemory (XMLNodeData *d) |
static void | detachFromParent (XMLNodeData *d) |
Classes | |
struct | XMLNodeDataTag |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XML.c - implementation file for basic XML parser written in ANSI C++ for portability. It works by using recursion and a node tree for breaking down the elements of an XML document.
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Frank Vanden Berghen nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |