rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlXmlDocument Class Reference

Default implementation for XML documents. More...

#include <ilog/xml.h>

Inheritance diagram for IlXmlDocument:
IlXmlDocumentI

List of all members.

Public Member Functions

virtual void addNode (IlXmlNodeI *)
 Adds a new node.
virtual IlXmlNodeIteratorIcreateNodesIterator () const
 Creates an iterator for the nodes of this document.
virtual void empty ()
 Empties this document.
IlXmlElementgetRootElement () const
 Gets the root element of this document.
virtual const char * getVersion () const
 Gets the version of the document.

Protected Member Functions

virtual void storeVersion (char *version)
 Stores the XML version.

Detailed Description

Default implementation for XML documents.

Library: ilog

This class can create, parse or output entire XML documents.
IlXmlDocument is a predefined type, derived from IlXmlDocumentI, that implements all the code that builds and holds a complete XML document that can be read from a stream.
You can use an XML document if you need a ready-to-use, efficient way of reading XML data that do not need streaming.


Member Function Documentation

virtual void IlXmlDocument::addNode ( IlXmlNodeI node  )  [virtual]

Adds a new node.

This method is called when the XML parser creates a top-level node. It can be an element (then it is unique, and considered as the root element of the document), a comment or a processing instruction.

Parameters:
node A pointer to the new node.

Implements IlXmlDocumentI.

virtual IlXmlNodeIteratorI* IlXmlDocument::createNodesIterator (  )  const [virtual]

Creates an iterator for the nodes of this document.

Returns:
A new instance of an iterator for all the nodes stored in this document. The caller is responsible for the destruction of this iterator.

Reimplemented from IlXmlDocumentI.

virtual void IlXmlDocument::empty (  )  [virtual]

Empties this document.

Removes and destroys all the nodes stored in this document. The default implementation does nothing.

Reimplemented from IlXmlDocumentI.

IlXmlElement* IlXmlDocument::getRootElement (  )  const

Gets the root element of this document.

An XML document may have one and only one root element, that may store several child nodes.

Returns:
A pointer to the first element located in this document (the first nodes that has the Element node type).
virtual const char* IlXmlDocument::getVersion (  )  const [virtual]

Gets the version of the document.

The default implementation returns the string "1.0".

Returns:
A string that describes the version of this document. The string must not be deleted or modified.
See also:
storeVersion.

Reimplemented from IlXmlDocumentI.

virtual void IlXmlDocument::storeVersion ( char *  version  )  [protected, virtual]

Stores the XML version.

The default implementation deletes the string and does not store it anywhere.

Parameters:
version The new version of this document. The string is stored as is and is not copied by the document.

Reimplemented from IlXmlDocumentI.


© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.