Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: Reading XML LibXML

by McA (Curate)
on Oct 02, 2013 at 11:07 UTC ( #1056599=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Reading XML LibXML
in thread Reading XML LibXML

...which dies horribly when there is only one <Entry>-element, e.g. the following XML:

<table> <Entry No="1"> <lastname_>Dasd</lastname_> <firstname_>Dasd</firstname_> <street_>Dasd</street_> <houseno_>12</houseno_> <zip_>1231</zip_> <city_>Dasd</city_> <sex_>maennlich</sex_> <marital_>geschieden</marital_> <character_>Brille Sommersprossen</character_> <description_>asdas </description_> </Entry> </table>

Which prooves what Anonymous monk said before... ;)

McA


Comment on Re^4: Reading XML LibXML
Download Code
Re^5: Reading XML LibXML
by hdb (Prior) on Oct 02, 2013 at 11:11 UTC

    True, but why would you write a script for a single record? ;)

      Probably a script fetching external xml-files, where you get 0-n <Entry>-tags in each file... ;)

        I agree with the statement about the limitations of XML::Simple. I like it a lot as it can solve simple problems with three lines of code, and I find it acceptable to use the one or other option as well (say ForceArray), but once you reach that point, a more powerful module is usually required.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-09-16 03:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (155 votes), past polls