class XMLParser

An XML Parser

Inheritance:


Public Methods

[more] XMLParser(const string &line="")
Construct a new parser
[more] XMLParser(XMLNode &root)
Set a XMLNode as root
[more] ~XMLParser()
Destroy the parser
[more]int tree_to_xml(string &line)
Write the XML Tree to to line.
[more]vector<XMLNode> get_tags(const string &key)
Get all tags in the tree whose name are key.
[more]XMLNode& get_root()
Return the root tag


Inherited from Expat:

Public Methods

ovoid parse(string data)
ovoid reset()

Protected Methods

ovirtual void recievedTag( XMLNode &n)
ovirtual void rootTagRecieved(XMLNode &root)
ovirtual void rootTagEnded()
ovirtual void parserError(string errorMsg, int line )


Documentation

An XML Parser

This class a string and parsers it to build a XML tree.

Usually you dont need to use this class directly, you can parse strings and convert XMLNodes to string directly with the XMLNode class.

o XMLParser(const string &line="")
Construct a new parser

Parameters:
line - Otherwise the tree is parsed from this string, that must contain the entire XML tree to be parsed.

o XMLParser(XMLNode &root)
Set a XMLNode as root

o ~XMLParser()
Destroy the parser

oint tree_to_xml(string &line)
Write the XML Tree to to line.

Parameters:
line - Otherwise store the tree in this string.

ovector<XMLNode> get_tags(const string &key)
Get all tags in the tree whose name are key.

Parameters:
key - What tags to return
Returns:
all the tags that match key
See Also:
tree_to_xml()

oXMLNode& get_root()
Return the root tag


This class has no child classes.
Author:
Henrik Abelsson
Version:
0.1

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.