NAME
XMLUtils - a module for useful XML utilities for Genex DBs
SYNOPSIS
use XMLUtils;
$out_string = pretty_print($in_string);
assert_element($dom_node, 'node_name');
DESCRIPTION
Methods for transforming information from a GeneX DB into XML.
FUNCTIONS
- pretty_print($string)
- pretty_print({INDENT=>$val,COLLAPSE=>[@list1],NO_ATTR_BALANCE=>[@list2]},$string)
-
This function takes an XML string and reformats it. The function takes an optional first parameter anonymous hash reference that enables modification of the internal reformatting parameters.
INDENT
The indent level in spaces. The defualt is 2.
COLLAPSE
A list of tags that should have their beginning and end tags collapsed onto a single line. This will result in any intervening tags collapsed onto the same line. The default is
('feature')
.NO_ATTR_BALANCE
A list of attribute names that should not be moved to a separate line. The default is
('xml')
.
- assert_element($dom_node, $node_name);
-
This raises an exception unless $dom_node is an obect of type XML::DOM::Node, and the tag name is $node_name.
AUTHOR
Jason Stewart (jes@ncgr.org)
SEE ALSO
perl(1).