Click here to get back home

data structure from XML::LibXML

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
data structure from XML::LibXML Dave Roe 10-06-2004
Get Chitika Premium
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 ThreadsPosted
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
LibXML on Redhat 4 x64 November 20, 2008, 11:58 am
compile problems with XML::LibXML December 22, 2004, 5:41 pm
problems with installation of XML::LibXML June 7, 2005, 10:30 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap