NAME
Bio::Phylo::Util::DOM::Document::twig - XML DOM document mappings to the XML::Twig
package
SYNOPSIS
Don't use directly; use Bio::Phylo::Util::DOM->new( -format => 'twig' ) instead.
DESCRIPTION
This module provides mappings the methods specified in the Bio::Phylo::Util::DOM::DocumentI interface to the XML::Twig
package.
AUTHOR
Mark A. Jensen ( maj -at- fortinbras -dot- us )
Constructor
- new()
-
Type : Constructor Title : new Usage : $doc = Bio::Phylo::Util::Dom::Document->new(@args) Function: Create a Document object using the underlying package Returns : Document object or undef on fail Args : Package-specific arguments
Document property accessors/mutators
- set_encoding()
-
Type : Mutator Title : set_encoding Usage : $doc->set_encoding($enc) Function: Set encoding for document Returns : True on success Args : Encoding descriptor as string
- get_encoding()
-
Type : Accessor Title : get_encoding Usage : $doc->get_encoding() Function: Get encoding for document Returns : Encoding descriptor as string Args : none
- set_root()
-
Type : Mutator Title : set_root Usage : $doc->set_root($elt) Function: Set the document's root element Returns : True on success Args : Element object
- get_root()
-
Type : Accessor Title : get_root Usage : $doc->get_root() Function: Get the document's root element Returns : Element object or undef if DNE Args : none
Document element accessors
- get_element_by_id()
-
Type : Accessor Title : get_element_by_id Usage : $doc->get_element_by_id($id) Function: Get element having id $id Returns : Element object or undef if DNE Args : id designator as string
- get_elements_by_tagname()
-
Type : Accessor Title : get_elements_by_tagname Usage : $elt->get_elements_by_tagname($tagname) Function: Get array of elements having given tag name Returns : Array of elements or undef if no match Args : tag name as string
Output methods
- to_xml_string()
-
Type : Serializer Title : to_xml_string Usage : $doc->to_xml_string Function: Create XML string from document Returns : XML string Args : Formatting arguments as allowed by underlying package
- to_xml_file()
-
Type : Serializer Title : to_xml_file Usage : $doc->to_xml_file() Function: Create XML file from document Returns : True on success Args : filename, formatting arguments as allowed by underlying package