Re: Xerces-perl for Win32

Brian Faull <[email protected]>
Newsgroups gmane.text.xml.xerces-p.devel
Organization The MITRE Corporation
Message-ID <[email protected]>
Wow, thanks!

Attached, if anyone is interested, is a modification of node2hash that
creates a data structure that is identical to that which XML::Simple
creates in XMLin(). It's not pretty, but neither is the data structure
used by XML::Simple. :)

I've written one the other way, too, but it's still flaky; I'll post both
again when I've cleaned them up.

Thanks again,
-brian

p.s. sorry that the subject in this thread has strayed so far from the
original 'subject'...


"Jason E. Stewart" wrote:
> 
> [email protected] (Jason E. Stewart) writes:
> 
> > > I've got the tags that have attributes using getAttributes -- very
> > > easy. However, stepping through an element that has a number of
> > > children, then (recursively) constructing a hash is utterly
> > > painful. Since this is DOM, I presume that this structure already
> > > exists in memory anyway... is there any way to access this with
> > > Perl? DomDocument->to_hash()!?
> >
> > Let me see if I can whip something up.
> 
> Ok, here it is. I actually just used plain old DOM. You should be able
> to modify the node2hash() subroutine to get the output you need.
> 
> Cheers,
> jas.
> --
> 
>   --------------------------------------------------------------------------
>                      Name: DOM2hash.pl
>    DOM2hash.pl       Type: Perl Program (application/x-perl)
>               Description: DOM2hash script
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.