Rogue Wave Views Foundation Package API Reference Guide |
Rogue Wave Views Documentation Home |
Interface for XML nodes. More...
#include <ilog/xml.h>
Public Types | |
enum | Type { Attribute, Element, Text, Comment, CData, PI, CharRef, EntityRef } |
The different types of XML nodes. More... | |
Public Member Functions | |
virtual Type | getType () const =0 |
Retrieves the type of this element. More... | |
virtual std::ostream & | write (std::ostream &stream) const =0 |
Writes the XML code for this node. More... | |
Interface for XML nodes.
Library: ilog
Every entity that is parsed in an XML stream is converted to an instance of a subclass of IlXmlNodeI
.
There are several subclasses of this interface, to handle the different entity types:
IlXmlElementI:
manipulates nodes that can have child nodes as well as attributes (accessed through the IlXmlAttributeI
interface). We call these "<i>elements</i>" for short. IlXmlAttributeI:
stores a key-value pair associated with an element. IlXmlCommentI:
manipulates XML comments that can be found in the XML stream. We call these "<EM>comments</EM>" for short. IlXmlTextI:
manipulates text entities that are located in elements. We call these "<EM>texts</EM>" for short. IlXmlPII:
manipulates processing instruction entities. We call these "<EM>PIs</EM>" for short. IlXmlCharRefI:
manipulates CharRef
entities that make it possible to address non-printable characters, or escape the characters that the XML format uses (such as '&' or '<'). We call these "<EM>CharRefs</EM>" for short. enum IlXmlNodeI::Type |
The different types of XML nodes.
|
pure virtual |
Retrieves the type of this element.
Implemented in IlXmlCharRefI, IlXmlCDataI, IlXmlPII, IlXmlTextI, IlXmlCommentI, IlXmlElementI, and IlXmlAttributeI.
|
pure virtual |
Writes the XML code for this node.
Each subclass of this class implements its own version of write()
, depending on its type.
stream | The output stream where the XML code will be sent. |
Implemented in IlXmlElementI, and IlXmlAttributeI.
© Copyright 2018, 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.