Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

XML & hashes...Need to know which xml parser could handle this

by Sombrerero_loco (Beadle)
on Jan 08, 2009 at 15:52 UTC ( [id://734929]=perlquestion: print w/replies, xml ) Need Help??

Sombrerero_loco has asked for the wisdom of the Perl Monks concerning the following question:

Hi monk-seekers!

Im again at the temple door to request you knowledge. I have an "weird" XML file that dont complain with any xml standard and i achieve to load into a hash. Now my hash has (he he) the next structure:
%warehouse{$name}{"SID"} = $name {$level} = from 1 to 18 {"service") = only for control {"sons"} = array with the his sons {"father") = $fathername (adquired before)
I need to get and xml like:
$fathername $son1 son1 son2 son3 son1 son1 son2 son1 son2
How its the better way to do that? maybe reorganizing my hash into another hash to has the structure then write out using and xml parser? or there's any xml that can handle that?

The $level represents the absolute deep of the element in the hierarchy, maybe this could be usefull.

Thanks for the efforts of your minds in advance.

Replies are listed 'Best First'.
Re: XML & hashes...Need to know which xml parser could handle this
by moritz (Cardinal) on Jan 08, 2009 at 16:22 UTC
    If I understood what you want, you can try XML::Simple, but I'm not sure if it does exactly what you want (maybe you need to play with the ValueAttr option a bit).
      thank you...i'll try...maybe i need to reorganize my hash into another hash using some kindof hask key auto creation...maybe anyone can tell me something.. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://734929]
Approved by Bloodnok
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found