Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^4: Reading XML LibXML

by McA (Priest)
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... ;)


Comment on Re^4: Reading XML LibXML
Download Code
Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2015-10-04 05:37 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (99 votes), past polls