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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to