Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: perl script to print xml data like this

by veerubiji (Sexton)
on Oct 04, 2011 at 08:28 UTC ( #929465=note: print w/ replies, xml ) Need Help??


in reply to Re: perl script to print xml data like this
in thread perl script to print xml data like this

Hi afreshl, thanks for your reply, and sorry for replying on both sites. because i cant post clearly there.

Argument "'\x{32}\x{30}..." isn't numeric in sort "
at foreach my $code (sort....) line. i am getting this argument in th second for loop frist line and your code is working but i am getting XML data under description is not like original format, it displying in diffrent order bottom comments to up and upper comments to down.


Comment on Re^2: perl script to print xml data like this
Download Code
Re^3: perl script to print xml data like this
by afresh1 (Hermit) on Oct 04, 2011 at 17:43 UTC

    The error does not occur with the sample so the actual xml is apparently different than what you provided. To get rid of the sorting error, just don't sort the output.

    14 foreach my $code ( keys %by_code ) {

    If you need the output exactly as it was, you will need to use a solution other than XML::Simple. As I said:

    It does not keep the exact XML formatting but that is something that is lost when XML::Simple parses it.
    l8rZ,
    --
    andrew

      thanks for your reply and suggestion i got my answer.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-08-22 04:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (146 votes), past polls