Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Duplicate entries with nested xml

by tobyink (Canon)
on Sep 04, 2014 at 16:38 UTC ( [id://1099568]=note: print w/replies, xml ) Need Help??


in reply to Re: Duplicate entries with nested xml
in thread Duplicate entries with nested xml

This part:

my $file = qq(appsimage_EBSB4.xml); open my $fh, '<', $file; binmode $fh; my $doc = XML::LibXML->load_xml(IO => $fh); close $fh;

Could be written more succinctly as:

my $doc = XML::LibXML->load_xml( location => qq(appsimage_EBSB4.xml) +);

Replies are listed 'Best First'.
Re^3: Duplicate entries with nested xml
by karlgoethebier (Abbot) on Sep 04, 2014 at 18:09 UTC
    "...written more succinctly..."

    Sure tobyink, nothing but the truth. I didn't know this.

    To be honest: I'm still using XML::Simple :-[ because i got a lot of config stuff written with it and cheated my example from the docs of XML::LibXML.

    N.B.: I also tried XML::LibXML::Simple with the stuff the OP provided, but it failed with the entity...

    Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

      XML::Rules will provide an easy way forward. Using the DTD or a few examples it can infer rules that'll instruct the parser to produce data structure equivalent to a well set XML::Simple and at the same time allow you to start tweaking and trimming the structure to better fit your needs.

      Jenda
      Enoch was right!
      Enjoy the last years of Rome.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1099568]
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-20 04:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found