Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Parsing XML file for more than 1 child element with attributes (XML::Twig)

by Cody Pendant (Prior)
on Feb 07, 2008 at 03:01 UTC ( [id://666720]=note: print w/replies, xml ) Need Help??


in reply to Re: Parsing XML file for more than 1 child element with attributes (XML::Twig)
in thread Parsing XML file for more than 1 child element with attributes

Just for the record, XML::Simple does choke on the non-well-formed XML. It dies with a very useful message.

I fixed the bad XML but didn't mention it for my example.



Nobody says perl looks like line-noise any more
kids today don't know what line-noise IS ...
  • Comment on Re^2: Parsing XML file for more than 1 child element with attributes (XML::Twig)

Replies are listed 'Best First'.
Re^3: Parsing XML file for more than 1 child element with attributes (XML::Twig)
by Anonymous Monk on Feb 07, 2008 at 06:40 UTC
    Thanks Cody Pendant and Tanktalus. my $simple = XML::Simple -> new (KeyAttr => 'node'); I thought the above was simple as the xml tree is returned as an hash of an hash and so on. But when i saw the structure entries like and made me think. Since i want a subroutine it will be easy for me to use. Hence i plan to use use XML::Twig; I can pass the XML as a string, mid and name to the subroutine. The return from the subroutine can be the values and timestamps.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-25 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found