Role Playing Database (API Documentation) 3.1.3

Public Member Functions | Static Public Member Functions | List of all members
ParseXML Class Reference
TclCommon

Class to hold an XML tree. This class parses an XML string and stores the result as a DOM Element tree. More...

## Public Member Functions
| ParseXML (xml,...)
| ~ParseXML ()
| displayTree (fp="stdout",...)

## Static Public Member Functions
static | validate (object)
| Validation typemethod. Raises an error if its argument is not a ParseXML object. More...
static | TopContainer (XML)

## Detailed Description

Class to hold an XML tree. This class parses an XML string and stores the result as a DOM Element tree.

Inheirets methods getElementsByTagName, getElementsById, and children from SimpleDOMElement.

## Constructor & Destructor Documentation

## ◆ ParseXML()

ParseXML::ParseXML | ( | xml | ,
|  |  | ...
| ) |  |

The constructor parses the XML string and stores it as a child of the rootnode component.

Parameters

  objname | Generally %AUTO% is passed.
  xml | The XML string.
  ... | Options. None at present.

## ◆ ~ParseXML()

ParseXML::~ParseXML | ( |  | ) |

The destructor – free up memory by destroying the root node.

## Member Function Documentation

## ◆ displayTree()

ParseXML::displayTree | ( | fp | = `"stdout"`,
|  |  | ...
| ) |  |

Display the XML tree.

Parameters

  fp | The channel to write the display to.
  ... | Options -addnamespace Boolean (default no) Add namespace.

## ◆ TopContainer()

static ParseXML::TopContainer | ( | XML |  | ) |
| static

Static function to peek into XML to find the top container.

Parameters

  XML | XML string.

Returns
  The top container tag.

## ◆ validate()

static ParseXML::validate | ( | object |  | ) |
| static

Validation typemethod. Raises an error if its argument is not a ParseXML object.

Parameters

  object | The object to typecheck.

Returns
  The object or raise an error.

The documentation for this class was generated from the following file:

- ParseXML.tcl