IXmlNode class Notes: Never use IXmlNode directly instead use reference counted XmlNodeRef.
class IXmlNode;
IXml.h
int m_nRefCount;
virtual ~IXmlNode();
Adds new child node.
virtual void addChild(const XmlNodeRef & node) = 0;
Reference counting.
virtual void AddRef();
Deep clone of this and all child xml nodes.
virtual XmlNodeRef clone() = 0;
Copies attributes to this node from a given node.
virtual void copyAttributes(XmlNodeRef fromNode) = 0;
Creates new XML node.
virtual XmlNodeRef createNode(const char * tag) = 0;
Deletes attribute.
virtual void delAttr(const char* key) = 0;
virtual void DeleteThis() = 0;
Finds node with specified tag.
virtual XmlNodeRef findChild(const char * tag) const = 0;
Gets XML Node attribute for specified key.
virtual const char* getAttr(const char * key) const = 0;
virtual bool getAttr(const char * key, Ang3& value) const = 0;
virtual bool getAttr(const char * key, ColorB & value) const = 0;
virtual bool getAttr(const char * key, Quat & value) const = 0;
virtual bool getAttr(const char * key, Vec2& value) const = 0;
virtual bool getAttr(const char * key, Vec2d& value) const = 0;
virtual bool getAttr(const char * key, Vec3& value) const = 0;
virtual bool getAttr(const char * key, Vec3d& value) const = 0;
virtual bool getAttr(const char * key, Vec4& value) const = 0;
virtual bool getAttr(const char * key, XmlString & value) const = 0;
virtual bool getAttr(const char * key, bool & value) const = 0;
bool getAttr(const char * key, char & value) const;
Gets XML Node attribute for specified key.
virtual bool getAttr(const char * key, const char ** value) const = 0;
True if the attribute exists, false otherwise.
virtual bool getAttr(const char * key, double & value) const = 0;
virtual bool getAttr(const char * key, float & value) const = 0;
Gets attribute value of node.
virtual bool getAttr(const char * key, int & value) const = 0;
virtual bool getAttr(const char * key, int64 & value) const = 0;
bool getAttr(const char * key, short & value) const;
virtual bool getAttr(const char * key, uint64 & value, bool useHexFormat = true) const = 0;
bool getAttr(const char * key, unsigned char & value) const;
virtual bool getAttr(const char * key, unsigned int & value) const = 0;
bool getAttr(const char * key, unsigned short & value) const;
Returns attribute key and value by attribute index.
virtual bool getAttributeByIndex(int index, const char ** key, const char ** value) = 0;
Gets XML Node child nodes.
virtual XmlNodeRef getChild(int i) const = 0;
Gets number of child XML nodes.
virtual int getChildCount() const = 0;
Returns content of this node.
virtual const char* getContent() const = 0;
Returns line number for XML tag.
virtual int getLine() const = 0;
Gets XML Node attributes.
virtual int getNumAttributes() const = 0;
Gets parent XML node.
virtual XmlNodeRef getParent() const = 0;
virtual int GetRefCount() const;
Gets XML node tag.
virtual const char * getTag() const = 0;
Returns XML of this node and sub nodes.
virtual XmlString getXML(int level = 0) const = 0;
Returns XML of this node and sub nodes. Notes: IXmlStringData pointer must be release when string is not needed anymore.
virtual IXmlStringData* getXMLData(int nReserveMem = 0) const = 0;
Checks if attributes with specified key exist.
virtual bool haveAttr(const char * key) const = 0;
Returns true if a given tag equal to node tag.
virtual bool isTag(const char * tag) const = 0;
Creates new xml node and add it to childs list.
virtual XmlNodeRef newChild(const char * tagName) = 0;
virtual void Release();
Notes: When ref count reach zero XML node dies.
Removes all node attributes.
virtual void removeAllAttributes() = 0;
Removes all child nodes.
virtual void removeAllChilds() = 0;
Removes child node.
virtual void removeChild(const XmlNodeRef & node) = 0;
virtual bool saveToFile(const char * fileName) = 0;
virtual void setAttr(const char* key, const Ang3& value) = 0;
virtual void setAttr(const char* key, const Quat & value) = 0;
virtual void setAttr(const char* key, const Vec2& value) = 0;
virtual void setAttr(const char* key, const Vec2d& value) = 0;
virtual void setAttr(const char* key, const Vec3& value) = 0;
virtual void setAttr(const char* key, const Vec3d& value) = 0;
virtual void setAttr(const char* key, const Vec4& value) = 0;
Sets new XML Node attribute (or override attribute with same key).
virtual void setAttr(const char* key, const char* value) = 0;
virtual void setAttr(const char* key, double value) = 0;
virtual void setAttr(const char* key, float value) = 0;
virtual void setAttr(const char* key, int value) = 0;
virtual void setAttr(const char* key, int64 value) = 0;
virtual void setAttr(const char* key, uint64 value, bool useHexFormat = true) = 0;
virtual void setAttr(const char* key, unsigned int value) = 0;
Sets content of this node.
virtual void setContent(const char * str) = 0;
Set line number in xml.
virtual void setLine(int line) = 0;
Sets XML node tag.
virtual void setTag(const char * tag) = 0;
Lets be friendly to him.
friend class XmlNodeRef;