Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: XML Transaction - random access.

by epoptai (Curate)
on Jun 30, 2001 at 00:28 UTC ( #92795=note: print w/ replies, xml ) Need Help??


in reply to Re: XML Transaction - random access.
in thread XML Transaction - random access.

Two notes on the use of XML::Simple:

  1. Since malformed XML is fatal to the parser you may want to wrap its evocation in an eval block.
  2. Use forcearray to avoid problems with references when the returned structure has empty elements.

$hashref = eval{ XMLin($XMLinaString, forcearray => 1) }; xml_parse_failure($@) if $@; # an error trapping sub

--
Check out my Perlmonks Related Scripts like framechat, reputer, and xNN.


Comment on Re: Re: XML Transaction - random access.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-12-26 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls