XML::Hash - Converts from a XML into a Hash.
my $xml_converter = XML::Hash->new(); # Convertion from a XML String to a Hash my $xml_hash = $xml_converter->fromXMLStringtoHash($xml); # Convertion from a Hash back into a XML String my $xml_str = $xml_converter->fromHashtoXMLString($xml_hash); # Convertion from a XML::DOM::Document into a HASH $xml_hash = $xml_converter->fromDOMtoHash($xml_doc); # Convertion from a HASH back info a XML::DOM::Document my $xml_doc = $xml_converter->fromHashtoDOM($xml_hash);
Simplifies the XML manipulation of documents by converting XML to perl Hashes.
You can manipulate the perl Hash and dump back to XML file. It accepts strings as well as XML::DOM::Documents. Also provides reverse methods that convert the Hash back into string/XML::DOM::Documents.
The interface it is OO based and extents XML::Simple functionality.
Constructor: passes the default options to XML::Simple superclass
Converts from XML::DOM::Document to a Hash $self->fromDOMtoHash($doc)
Converts from a HASH into XML::DOM::Document $self->fromHashtoDOM($hash)
Converts from a XML String to a Hash $self->fromXMLStringtoHash($str)
Converts from a Hash into a XML String $self->fromHashtoXMLString($hash)
You can find documentation for this module with the perldoc command.
Copyright 2008 Luis Azevedo, all rights reserved.
This program is free software licensed under the BSD License
The full text of the license can be found in the LICENSE file included with this module.