FUXmlDocument Class Reference

Simple container for a XML document. More...

#include <FUXmlDocument.h>

List of all members.

Public Member Functions

 FUXmlDocument (FUFileManager *manager, const fchar *filename, bool isParsing)
 Constructor.
 FUXmlDocument (const char *data, size_t length=(size_t)~0)
 Creates an XML document from a data string.
 ~FUXmlDocument ()
 Destructor.
xmlNode * CreateRootNode (const char *name)
 Creates the root XML tree node for the document.
void ReleaseXmlData ()
 Releases the stored XML data, if any.
xmlNode * GetRootNode ()
 Retrieves the root XML tree node for the document.
bool Write (const char *encoding="utf-8")
 Writes out the XML document.


Detailed Description

Simple container for a XML document.

When this container is released, it will automatically release the XML document.


Constructor & Destructor Documentation

FUXmlDocument::FUXmlDocument FUFileManager manager,
const fchar *  filename,
bool  isParsing
 

Constructor.

Opens the XML document for the given filename.

Parameters:
manager To handle non-file system opens and to handle relative paths.
filename The filename of the XML document to open.
isParsing Whether the document should be opened from file or created and written out.

FUXmlDocument::FUXmlDocument const char *  data,
size_t  length = (size_t)~0
 

Creates an XML document from a data string.

Parameters:
data The data buffer containing the XML document.
length The length of the data. If the length is -1, the data buffer must be NULL-terminated.

FUXmlDocument::~FUXmlDocument  ) 
 

Destructor.

Releases the XML document.


Member Function Documentation

xmlNode* FUXmlDocument::CreateRootNode const char *  name  ) 
 

Creates the root XML tree node for the document.

Parameters:
name The name of the root XML tree node.
Returns:
The newly created root XML tree node.

xmlNode* FUXmlDocument::GetRootNode  ) 
 

Retrieves the root XML tree node for the document.

Returns:
The root XML tree node. This pointer will be NULL if the document did not load successfully.

bool FUXmlDocument::Write const char *  encoding = "utf-8"  ) 
 

Writes out the XML document.

Parameters:
encoding The format encoding string.
Returns:
Whether the XML document was written out successfully.


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 16:58:41 2008 for FCollada by  doxygen 1.4.6-NO