Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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... ;)


Replies are listed 'Best First'.
Re^5: Reading XML LibXML
by hdb (Monsignor) 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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2018-05-21 17:26 GMT
Find Nodes?
    Voting Booth?