|
Posted by Dave Roe on October 6, 2004, 6:22 pm
Please log in for more thread options
I am hunting for a way of dumping a data structure from an XML::LibXML
document or element.
To explain, both XML::Simple and XML::Twig have a way of turning the
document into a data structure. XML::Simple has XMLin() and XML::Twig
has simplify(), both of which return a Perl data structure.
I make heavy use of XML::LibXML across my project and would prefer to
not have to introduce a secondary XML module for this purpose alone.
Will I have to roll my own "simplify" method that walks libxml elements
from which to create the data structure? I have been unable to find any
docs or usenet postings regarding this subject.
Thanks,
/dave
|
|
Posted by Jim Keenan on October 8, 2004, 1:01 am
Please log in for more thread options
Dave Roe wrote:
> I am hunting for a way of dumping a data structure from an XML::LibXML
> document or element.
From which specific XML::LibXML package do you wish to dump a data
structure? The documentation
(http://search.cpan.org/~phish/XML-LibXML-1.58_1/LibXML.pod) indicates
that the module is divided into approx. 16 packages.
jimk
|
|
Posted by Dave Roe on October 7, 2004, 8:26 pm
Please log in for more thread options Jim Keenan wrote:
> Dave Roe wrote:
>
>> I am hunting for a way of dumping a data structure from an XML::LibXML
>> document or element.
>
> From which specific XML::LibXML package do you wish to dump a data
> structure? The documentation
> (http://search.cpan.org/~phish/XML-LibXML-1.58_1/LibXML.pod) indicates
> that the module is divided into approx. 16 packages.
From a document or an element, meaning an XML::LibXML::Document or an
XML::LibXML::Element (and any/all other packages, whether they be Text,
Attribute, CDATASection, etc).
Essentially, I would like to be able to either dump a whole
XML::LibXML::Document, or fetch a particular element and dump that, and
the contained tree would be walked and dump out appropriately, depending
on the type of element found.
/dave
|
| Similar Threads | Posted | | ANNOUNCE: GraphViz::Data::Structure 0.11 | September 27, 2004, 11:31 pm |
| Class::Struct - want to access structure within structure | April 29, 2006, 3:33 pm |
| XML::LibXML and getting data from elements/nodes | October 26, 2004, 7:50 pm |
| CPAN tarball structure for related web-server files? | January 8, 2008, 4:39 pm |
| Possible bug in XML:LibXML | December 16, 2007, 6:22 am |
| LibXML and DTD's | July 5, 2007, 1:26 pm |
| Questions about XML:LibXML | December 16, 2007, 6:22 am |
| compile problems with XML::LibXML | December 22, 2004, 5:41 pm |
| problems with installation of XML::LibXML | June 7, 2005, 10:30 am |
| namespace declarations in LibXML | April 15, 2006, 12:48 am |
|