IncredibleXMLParser  3.05
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
IXMLNode Class Reference

Main Class representing an Incredible Non-Transient and Editable XML node. More...

#include <IXMLParser.h>

Inheritance diagram for IXMLNode:
ITCXMLNode

Public Member Functions

IXMLNode getParentNode () const
 return the parent node More...
 
IXMLNode getChildNode (int i=0) const
 return ith child node More...
 
IXMLNode getChildNode (IXMLCStr name, int i) const
 return ith child node with specific name (return an empty node if failing). If i==-1, this returns the last IXMLNode with the given name More...
 
IXMLNode getChildNode (IXMLCStr name, int *i=NULL) const
 return next child node with specific name (return an empty node if failing) More...
 
IXMLNode getChildNodeWithAttribute (IXMLCStr tagName, IXMLCStr attributeName, IXMLCStr attributeValue=NULL, int *i=NULL) const
 return child node with specific name/attribute (return an empty node if failing) More...
 
IXMLNode getChildNodeByPath (IXMLCStr path, IXMLChar sep='/') const
 return the first child node with specific path More...
 
IXMLNode getChildNodeByPathNonConst (IXMLStr path, IXMLChar sep='/') const
 
 ~IXMLNode ()
 
 IXMLNode (const IXMLNode &A)
 to allow shallow/fast copy: More...
 
IXMLNodeoperator= (const IXMLNode &A)
 to allow shallow/fast copy: More...
 
 IXMLNode ()
 
IXMLNode addChild (IXMLCStr pName, char isDeclaration=FALSE, IXMLElementPosition pos=-1)
 Add a new child node. More...
 
IXMLNode addChild (IXMLNode nodeToAdd, IXMLElementPosition pos=-1)
 If the "nodeToAdd" has some parents, it will be detached from it's parents before being attached to the current IXMLNode. More...
 
IXMLAttributeaddAttribute (IXMLCStr pName, IXMLCStr pValuev)
 Add a new attribute. More...
 
IXMLCStr addText (IXMLCStr pValue, IXMLElementPosition pos=-1)
 Add a new text content. More...
 
IXMLClearaddClear (IXMLCStr pValue, IXMLCStr lpcOpen=NULL, IXMLCStr lpcClose=NULL, IXMLElementPosition pos=-1)
 
IXMLCStr updateName (IXMLCStr pName)
 change node's name More...
 
IXMLAttributeupdateAttribute (IXMLAttribute *newAttribute, IXMLAttribute *oldAttribute)
 if the attribute to update is missing, a new one will be added More...
 
IXMLAttributeupdateAttribute (IXMLCStr lpcNewValue, IXMLCStr lpcNewName=NULL, int i=0)
 if the attribute to update is missing, a new one will be added More...
 
IXMLAttributeupdateAttribute (IXMLCStr lpcNewValue, IXMLCStr lpcNewName, IXMLCStr lpcOldName)
 set lpcNewName=NULL if you don't want to change the name of the attribute if the attribute to update is missing, a new one will be added More...
 
IXMLCStr updateText (IXMLCStr lpcNewValue, int i=0)
 if the text to update is missing, a new one will be added More...
 
IXMLCStr updateText (IXMLCStr lpcNewValue, IXMLCStr lpcOldValue)
 if the text to update is missing, a new one will be added More...
 
IXMLClearupdateClear (IXMLCStr lpcNewContent, int i=0)
 if the clearTag to update is missing, a new one will be added More...
 
IXMLClearupdateClear (IXMLClear *newP, IXMLClear *oldP)
 if the clearTag to update is missing, a new one will be added More...
 
IXMLClearupdateClear (IXMLCStr lpcNewValue, IXMLCStr lpcOldValue)
 if the clearTag to update is missing, a new one will be added More...
 
void deleteNodeContent ()
 The "deleteNodeContent" function forces the deletion of the content of this IXMLNode and the subtree. More...
 
void deleteAttribute (int i=0)
 Delete the ith attribute of the current IXMLNode. More...
 
void deleteAttribute (IXMLCStr pName)
 Delete the attribute with the given name (the "strcmp" function is used to find the right attribute) More...
 
void deleteAttribute (IXMLAttribute *anAttribute)
 Delete the attribute with the name "anAttribute->pName" (the "strcmp" function is used to find the right attribute) More...
 
void deleteText (int i=0)
 Delete the Ith text content of the current IXMLNode. More...
 
void deleteText (IXMLCStr pValue)
 Delete the text content "pValue" inside the current IXMLNode (direct "pointer-to-pointer" comparison is used to find the right text) More...
 
void deleteClear (int i=0)
 Delete the Ith clear tag inside the current IXMLNode. More...
 
void deleteClear (IXMLCStr pValue)
 Delete the clear tag "pValue" inside the current IXMLNode (direct "pointer-to-pointer" comparison is used to find the clear tag) More...
 
void deleteClear (IXMLClear *p)
 Delete the clear tag "p" inside the current IXMLNode (direct "pointer-to-pointer" comparison on the pName of the clear tag is used to find the clear tag) More...
 
IXMLNode addChild_WOSD (IXMLStr pName, char isDeclaration=FALSE, IXMLElementPosition pos=-1)
 Add a new child node. More...
 
IXMLAttributeaddAttribute_WOSD (IXMLStr pName, IXMLStr pValue)
 Add a new attribute. More...
 
IXMLCStr addText_WOSD (IXMLStr pValue, IXMLElementPosition pos=-1)
 Add a new text content. More...
 
IXMLClearaddClear_WOSD (IXMLStr pValue, IXMLCStr lpcOpen=NULL, IXMLCStr lpcClose=NULL, IXMLElementPosition pos=-1)
 Add a new clear Tag. More...
 
IXMLCStr updateName_WOSD (IXMLStr pName)
 change node's name More...
 
IXMLAttributeupdateAttribute_WOSD (IXMLAttribute *newAttribute, IXMLAttribute *oldAttribute)
 if the attribute to update is missing, a new one will be added More...
 
IXMLAttributeupdateAttribute_WOSD (IXMLStr lpcNewValue, IXMLStr lpcNewName=NULL, int i=0)
 if the attribute to update is missing, a new one will be added More...
 
IXMLAttributeupdateAttribute_WOSD (IXMLStr lpcNewValue, IXMLStr lpcNewName, IXMLCStr lpcOldName)
 set lpcNewName=NULL if you don't want to change the name of the attribute if the attribute to update is missing, a new one will be added More...
 
IXMLCStr updateText_WOSD (IXMLStr lpcNewValue, int i=0)
 if the text to update is missing, a new one will be added More...
 
IXMLCStr updateText_WOSD (IXMLStr lpcNewValue, IXMLCStr lpcOldValue)
 if the text to update is missing, a new one will be added More...
 
IXMLClearupdateClear_WOSD (IXMLStr lpcNewContent, int i=0)
 if the clearTag to update is missing, a new one will be added More...
 
IXMLClearupdateClear_WOSD (IXMLClear *newP, IXMLClear *oldP)
 if the clearTag to update is missing, a new one will be added More...
 
IXMLClearupdateClear_WOSD (IXMLStr lpcNewValue, IXMLCStr lpcOldValue)
 if the clearTag to update is missing, a new one will be added More...
 
IXMLElementPosition positionOfText (int i=0) const
 
IXMLElementPosition positionOfText (IXMLCStr pValue) const
 
IXMLElementPosition positionOfClear (int i=0) const
 
IXMLElementPosition positionOfClear (IXMLCStr pValue) const
 
IXMLElementPosition positionOfClear (IXMLClear *a) const
 
IXMLElementPosition positionOfChildNode (int i=0) const
 
IXMLElementPosition positionOfChildNode (IXMLNode x) const
 
IXMLElementPosition positionOfChildNode (IXMLCStr name, int i=0) const
 return the position of the ith childNode with the specified name if (name==NULL) return the position of the ith childNode More...
 
- Public Member Functions inherited from ITCXMLNode
IXMLCStr getName () const
 name of the node More...
 
IXMLCStr getText (int i=0) const
 return ith text field More...
 
int nText () const
 nbr of text field More...
 
ITCXMLNode getParentNode () const
 return the parent node More...
 
ITCXMLNode getChildNode (int i=0) const
 return ith child node More...
 
ITCXMLNode getChildNode (IXMLCStr name, int i) const
 return ith child node with specific name (return an empty node if failing). If i==-1, this returns the last IXMLNode with the given name More...
 
ITCXMLNode getChildNode (IXMLCStr name, int *i=NULL) const
 return next child node with specific name (return an empty node if failing) More...
 
ITCXMLNode getChildNodeWithAttribute (IXMLCStr tagName, IXMLCStr attributeName, IXMLCStr attributeValue=NULL, int *i=NULL) const
 return child node with specific name/attribute (return an empty node if failing) More...
 
ITCXMLNode getChildNodeByPath (IXMLCStr path, IXMLChar sep='/') const
 return the first child node with specific path More...
 
ITCXMLNode getChildNodeByPathNonConst (IXMLStr path, IXMLChar sep='/') const
 return the first child node with specific path More...
 
IXMLCStr getElementByPath (IXMLCStr xpath, IXMLChar sep='/') const
 return the text content of the given simplified XPATH More...
 
IXMLCStr getElementByPathNonConst (IXMLStr xpath, IXMLChar sep='/') const
 return the text content of the given simplified XPATH More...
 
int nChildNode (IXMLCStr name) const
 return the number of child node with specific name More...
 
int nChildNode () const
 nbr of child node More...
 
IXMLAttribute getAttribute (int i=0) const
 return ith attribute More...
 
IXMLCStr getAttributeName (int i=0) const
 return ith attribute name More...
 
IXMLCStr getAttributeValue (int i=0) const
 return ith attribute value More...
 
char isAttributeSet (IXMLCStr name) const
 test if an attribute with a specific name is given More...
 
IXMLCStr getAttribute (IXMLCStr name, int i) const
 return ith attribute content with specific name (return a NULL if failing) More...
 
IXMLCStr getAttribute (IXMLCStr name, int *i=NULL) const
 return next attribute content with specific name (return a NULL if failing) More...
 
int nAttribute () const
 nbr of attribute More...
 
IXMLClear getClear (int i=0) const
 return ith clear field (comments) More...
 
int nClear () const
 nbr of clear field More...
 
int nElement () const
 nbr of different contents for current node More...
 
char isEmpty () const
 is this node Empty? More...
 
char isProcessInstruction () const
 is this node a Process instruction <? .... ?> More...
 
IXMLNode deepCopy () const
 deep copy (duplicate/clone) a IXMLNode More...
 
ICXMLNode deepCopyConstant () const
 deep copy (duplicate/clone) a IXMLNode More...
 
 ITCXMLNode (const ITCXMLNode &A)
 to allow shallow/fast copy: More...
 
ITCXMLNodeoperator= (const ITCXMLNode &A)
 to allow shallow/fast copy: More...
 
 ITCXMLNode ()
 

Static Public Member Functions

static IXMLNode emptyNode ()
 return an empty Node; More...
 
static IXMLNode createXMLTopNode (IXMLCStr pName=NULL, char isDeclaration=FALSE)
 Create the top node of an IXMLNode structure. More...
 
static IXMLNode createXMLTopNode_WOSD (IXMLStr pName, char isDeclaration=FALSE)
 Create the top node of an IXMLNode structure. More...
 
- Static Public Member Functions inherited from ITCXMLNode
static ITCXMLNode emptyNode ()
 return IXMLNode::emptyIXMLNode; More...
 
static IXMLCStr getErrorMessage (IXMLError error)
 this gives you a user-friendly explanation of the parsing error More...
 

Static Public Attributes

static IXMLNode emptyIXMLNode
 
- Static Public Attributes inherited from ITCXMLNode
static ITCXMLNode emptyITCXMLNode
 
static IXMLClear emptyIXMLClear
 
static IXMLAttribute emptyXMLAttribute
 

Friends

class IXMLRenderer
 
class ITCXMLNode
 

Detailed Description

Main Class representing an Incredible Non-Transient and Editable XML node.

Use the IXMLNode class when you want to modify/update/edit a XMLNode structure. The constructors of the ITCXMLNode class are protected, so use instead one of these four methods to get your first instance of IXMLNode:

Definition at line 1121 of file IXMLParser.h.

Constructor & Destructor Documentation

IXMLNode::~IXMLNode ( )
IXMLNode::IXMLNode ( const IXMLNode A)

to allow shallow/fast copy:

IXMLNode::IXMLNode ( )
inline

Definition at line 1141 of file IXMLParser.h.

Member Function Documentation

static IXMLNode IXMLNode::emptyNode ( )
static

return an empty Node;

IXMLNode IXMLNode::getChildNode ( int  i = 0) const

return ith child node

Referenced by example10(), example3(), and example5().

IXMLNode IXMLNode::getChildNode ( IXMLCStr  name,
int  i 
) const

return ith child node with specific name (return an empty node if failing). If i==-1, this returns the last IXMLNode with the given name

IXMLNode IXMLNode::getChildNode ( IXMLCStr  name,
int *  i = NULL 
) const

return next child node with specific name (return an empty node if failing)

IXMLNode IXMLNode::getChildNodeByPath ( IXMLCStr  path,
IXMLChar  sep = '/' 
) const

return the first child node with specific path

IXMLNode IXMLNode::getChildNodeByPathNonConst ( IXMLStr  path,
IXMLChar  sep = '/' 
) const
IXMLNode IXMLNode::getChildNodeWithAttribute ( IXMLCStr  tagName,
IXMLCStr  attributeName,
IXMLCStr  attributeValue = NULL,
int *  i = NULL 
) const

return child node with specific name/attribute (return an empty node if failing)

IXMLNode IXMLNode::getParentNode ( ) const

return the parent node

Referenced by example10().

IXMLNode& IXMLNode::operator= ( const IXMLNode A)

to allow shallow/fast copy:

Friends And Related Function Documentation

friend class ITCXMLNode
friend

Definition at line 1124 of file IXMLParser.h.

friend class IXMLRenderer
friend

Definition at line 1123 of file IXMLParser.h.

Member Data Documentation

IXMLNode IXMLNode::emptyIXMLNode
static

Definition at line 1141 of file IXMLParser.h.


The documentation for this class was generated from the following file: