rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlXmlNodeFactory Class Reference

Node factory used when parsing XML documents. More...

#include <ilog/xml.h>

Public Member Functions

IlXmlAttributeIcreateAttribute (IlXmlElementI *element, char *name, char *value) const
 Creates an XML attribute. More...
 
IlXmlCDataIcreateCData () const
 Creates a CData node. More...
 
IlXmlCharRefIcreateCharRef () const
 Creates an XML CharRef node. More...
 
IlXmlCommentIcreateComment () const
 Creates an XML comment node. More...
 
IlXmlElementIcreateElement (char *tag) const
 Creates an XML element. More...
 
IlXmlPIIcreatePI () const
 Creates a PI node. More...
 
IlXmlTextIcreateText () const
 Creates an XML text node. More...
 

Detailed Description

Node factory used when parsing XML documents.

Library: ilog

Instances of IlXmlNodeFactory are used by instances of IlXmlDocumentI when reading XML data that does not need streaming (that is, XML entities are built and kept in memory).
As the reading goes along, XML entities are parsed from the XML data, and XML entities need to be created to hold the data that they represent. The node factory allows you to specify what XML node types you want to be able to manipulate, and let you add your own, application specific, data to the classes that represent the XML tree.

Member Function Documentation

IlXmlAttributeI* IlXmlNodeFactory::createAttribute ( IlXmlElementI element,
char *  name,
char *  value 
) const

Creates an XML attribute.

This method should return an instance of a new attribute that will be added to element.

Parameters
elementThe element where this attribute will be added.
nameThe name of this attribute. This method must store this string in the attribute, or delete it if it creates an attribute that does not need the name.
nameThe value of this attribute. This method must store this string in the attribute, or delete it if it creates an attribute that does not need the value.
Returns
A pointer to a new XML attribute. The default implementation returns 0.
IlXmlCDataI* IlXmlNodeFactory::createCData ( ) const

Creates a CData node.

Returns
A pointer to a new XML CData node. The default implementation returns 0.
IlXmlCharRefI* IlXmlNodeFactory::createCharRef ( ) const

Creates an XML CharRef node.

Returns
A pointer to a new XML CharRef node. The default implementation returns 0.
IlXmlCommentI* IlXmlNodeFactory::createComment ( ) const

Creates an XML comment node.

Returns
A pointer to a new XML comment node. The default implementation returns 0.
IlXmlElementI* IlXmlNodeFactory::createElement ( char *  tag) const

Creates an XML element.

Parameters
tagThe tag of the new element.
Returns
A pointer to a new XML element. The default implementation returns 0.
IlXmlPII* IlXmlNodeFactory::createPI ( ) const

Creates a PI node.

Returns
A pointer to a new XML PI node. The default implementation returns 0.
IlXmlTextI* IlXmlNodeFactory::createText ( ) const

Creates an XML text node.

Returns
A pointer to a new XML text node. The default implementation returns 0.

© 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.