code::XML Class Reference

List of all members.

Detailed Description

Provides a means of parsing, representing and writing out XML documents.

This class' parser is focused on size and speed, and parses a subset of XML: there is no validation, no entity resolution (other than the built-in entities such as < and &), and no comment parsing. No CDATA elements are allowed. The only encoding supported is UTF-8.

Mixed content is not recommended -- elements can have either sub-elements or text. With this constraint, there is no need for white-space ignoring heuristics. Also, there is no need to keep track of an element's children as Nodes -- they are always Elements.

The main classes are:

  1. See also:
    XML::Parser -- will parse a XML stream and build a document
  2. See also:
    XML::Outputter -- will output XML to the given C++ stream.
  3. See also:
    XML::Document -- currently, this contains just a root element. It is there, in case we add processing instructions in the future.
  4. See also:
    XML::Element -- the workhorse of the content of an XML document.

Author:
Lakshman, Charles Kerr
Version:
Id
code_XML.h,v 1.11 2009/06/02 20:17:40 lakshman Exp


Public Types

typedef std::map< std::string,
std::string > 
AttributeMap
typedef Element::children_t ElementList
 list of elements such as that filled in by Element::getChildren

Static Public Member Functions

static std::string replaceEntities (const std::string &input)
 returns "a<b" for "a&lt;b"
static std::string replaceWithEntities (const std::string &input)
 returns "a&lt;b" for "a<b"

Classes

class  Document
 An XML Document. More...
class  Element
 An XML Element. More...
class  Outputter
 Allows you to write a XML Document to an XML output stream. More...
class  Parser
 Allows you to build a XML Document from an XML input stream. More...


Member Typedef Documentation

typedef std::map< std::string, std::string > code::XML::AttributeMap

typedef Element::children_t code::XML::ElementList

list of elements such as that filled in by Element::getChildren


Member Function Documentation

static std::string code::XML::replaceEntities ( const std::string &  input  )  [static]

returns "a<b" for "a&lt;b"

static std::string code::XML::replaceWithEntities ( const std::string &  input  )  [static]

returns "a&lt;b" for "a<b"


Generated on Fri May 4 13:40:13 2012 for WDSS-IIw2 by  doxygen 1.4.7