iPE::XML::DocObject(3)

NAME
iPE::XML::DocObject - The document object class for all XML document based objects.

DESCRIPTION
This class is a subclass of the iPE::XML::Object class. Like XML::Objects, it has an associated node, but also has a document node which can be printed out afterward. The aim of this class is to allow all objects which came from an XML document to be reproduced in XML format with added, removed or altered data.

FUNCTIONS

new ()
    This constructor should be called in all subclasses. Unlike with XML objects, they are not constructed with a document, so you cannot handle the children elements. handle_children is called automatically from the parse_file method, so there is no need to call it from here.

parser ()
    Returns the parser object used to parse the XML document

document ()
    Returns the XML::LibXML::Document object representing the entire XML Document.

rootName ()
    Returns the root name of this document. Can be used for validating whether the correct type of document is being parsed.

filename ()
    Returns the name of the file from which this document object was parsed, if any exists.

parse_file (filename[, old_root, [, new_root, new_system_id]])
    Parses the file referenced by the filename passed and populates the object with the data contained in the file, after checking the file for XML errors. Pass filename so error messages can output the filename.

    Optionally, pass the name of the root node you expect to see in the document to validate that this is the correct type of file for parsing.

    Optionally, pass a new root element name and system id to set this document's system id in a new file. This is good if you are adding new elements not included in the DTD for the original file.

outputXML (out)
    Prints out the entire XML document.

SEE ALSO
iPE::XML::Object

AUTHOR
Bob Zimmermann (rpz@cse.wustl.edu)