OpenSim::XMLDocument Class Reference

A class for managing and for performing operations on an XML document. More...

#include <XMLDocument.h>

List of all members.

Public Member Functions

virtual ~XMLDocument ()
 Handle delete of an XMLDocument object.
 XMLDocument ()
 Construct a XMLDocument object with a locally generated DOMDocument.
 XMLDocument (const std::string &aFileName)
 XMLDocument (const XMLDocument &aDocument)
 Construct a copy of an XMLDocument object.
const int & getDocumentVersion () const
DOMElement * getRootDataElement ()
 getRootDataElement returns a pointer to the real root node that contains objects works as a wrapper to get around the new root node <OpenSimDocument introduced in 1.6
DOMDocument * getDOMDocument () const
 Get the XML document.
void setFileName (const std::string &aFileName)
const std::string & getFileName () const
bool print (const std::string &aFileName=NULL)

Static Public Member Functions

static const int & getLatestVersion ()
static void getVersionAsString (const int aVersion, std::string &aString)
 Convert passed in version number to a string The string is usually more compact e.g.

Static Public Attributes

static const XMLCh UTF8 []
static const XMLCh VERSION []
static const int LatestVersion = 20302
 Latest version of the code encoded as an int xxyyzz where x: major release, y: minor, z: patch.

Detailed Description

A class for managing and for performing operations on an XML document.

The document can originate from one of two sources: 1) parsed from an XML source or 2) created locally in memory.

This product includes software developed by the Apache Software Foundation (http://www.apache.org/).

Version:
1.0
Author:
Frank C. Anderson

Constructor & Destructor Documentation

XMLDocument::~XMLDocument (  )  [virtual]

Handle delete of an XMLDocument object.

XMLDocument::XMLDocument (  ) 

Construct a XMLDocument object with a locally generated DOMDocument.

This constructor is used when an XML document is going to be generated locally in memory without reference to an XML file. The initial DOMDocument is empty.

OpenSim::XMLDocument::XMLDocument ( const std::string &  aFileName  ) 
XMLDocument::XMLDocument ( const XMLDocument aDocument  ) 

Construct a copy of an XMLDocument object.

The document an all its nodes are copied; however, the parser associated with the copied document, if any, is not copied.


Member Function Documentation

const int& OpenSim::XMLDocument::getDocumentVersion (  )  const [inline]
DOMDocument * XMLDocument::getDOMDocument (  )  const

Get the XML document.

Note that the returned document, and any of its child nodes, should never be deleted by the caller. The document and resources associated with the document will be deleted when this XMLDocument object is deleted.

Returns:
Document, or NULL if no document has been generated.
const string & XMLDocument::getFileName (  )  const
static const int& OpenSim::XMLDocument::getLatestVersion (  )  [inline, static]
DOMElement * XMLDocument::getRootDataElement (  ) 

getRootDataElement returns a pointer to the real root node that contains objects works as a wrapper to get around the new root node <OpenSimDocument introduced in 1.6

void XMLDocument::getVersionAsString ( const int  aVersion,
std::string &  aString 
) [static]

Convert passed in version number to a string The string is usually more compact e.g.

010100 -> 1_1 (rather than 11 which would confuse 110000 with 010100)

bool OpenSim::XMLDocument::print ( const std::string &  aFileName = NULL  ) 
void OpenSim::XMLDocument::setFileName ( const std::string &  aFileName  ) 

Member Data Documentation

const int XMLDocument::LatestVersion = 20302 [static]

Latest version of the code encoded as an int xxyyzz where x: major release, y: minor, z: patch.

const XMLCh XMLDocument::UTF8 [static]
Initial value:
 {
        chLatin_U, chLatin_T, chLatin_F, chDash, chDigit_8, 0 }
const XMLCh XMLDocument::VERSION [static]
Initial value:
 {
        chDigit_1, chPeriod, chDigit_0, 0 }

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

Generated on Sun Sep 25 00:19:53 2011 for OpenSim by  doxygen 1.6.1