Main Page | Modules | Class Hierarchy | Class List | Class Members

MXMLElement Class Reference
[Micro XML Document Object Model]

#include <mxmldom.h>

Inheritance diagram for MXMLElement:

MXMLNode List of all members.

Detailed Description

Node representing an XML element.

XML elements contain child nodes. They are named, and have child attributes.


Public Member Functions

AttributesGetAttributes ()
 Get the elements attributes.
void SetName (const char *a_name)
 Set the element name (UTF8).
const char * GetName () const
 Get the element name (UTF8).
bool IsName (const char *a_name) const
 is the element named a_name (UTF8)
virtual const char * GetText () const
 Get all child text derived nodes appended.
MXMLElementFindChild (const char *a_name)
 Find the first named child element.
MXMLNodeGetFirstChild ()
 Get the first child node.
MXMLNodeGetLastChild ()
 Get the last child node.
MXMLElementGetFirstChildElement ()
 Get the first child element.
MXMLElementGetNextSiblingElement ()
 Get the next sibling element.
bool RemoveChild (MXMLNode *a_node)
 Remove a child node.
bool InsertAfter (MXMLNode *a_cursor, MXMLNode *a_node)
 Insert a node after the cursor.
bool InsertBefore (MXMLNode *a_cursor, MXMLNode *a_node)
 Insert a node before the cursor.
void InsertLast (MXMLNode *a_node)
 Insert a node after the last child node.
MXMLDeclarationAppendDeclaration (const char *a_declaration=NULL, size_t a_size=0)
 Create and append an MXMLDeclaration node.
MXMLCommentAppendComment (const char *a_comment=NULL, size_t a_size=0)
 Create and append an MXMLComment node.
MXMLTextAppendText (const char *a_text=NULL, size_t a_size=0)
 Create and append an MXMLText node.
MXMLCDATAAppendCDATA (const char *a_cdata=NULL, size_t a_size=0)
 Create and append an MXMLCDATA node.
MXMLElementAppendElement (const char *a_name=NULL)
 Create and append an MXMLElement node.
virtual void Format (int a_tabs=0)
 Reformat the element with white space.


Member Function Documentation

void MXMLElement::Format int  a_tabs = 0  )  [virtual]
 

Reformat the element with white space.

Format will trim all current document whitespace and re format the document with the said number of tabs (tabs == 2 spaces)

const char * MXMLElement::GetText  )  const [virtual]
 

Get all child text derived nodes appended.

This method uses the owning documents buffer to append child text nodes.

Reimplemented from MXMLNode.

bool MXMLElement::RemoveChild MXMLNode a_node  ) 
 

Remove a child node.

Once a node is removed, it must be either re-inserted or manually disposed


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