Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: XML Simple

by Jenda (Abbot)
on Jan 25, 2010 at 14:25 UTC ( [id://819494]=note: print w/replies, xml ) Need Help??


in reply to XML Simple

If your data looks like you show, the statement should work. If it doesn't try to cut off from the end till it does to find the step that causes problems.

And as jettero suggests, try to have a look at other options that would give you a simpler datastructure or a way to query for the stuff you are interested in. Search PerlMonks for XML::Rules for example.

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

Replies are listed 'Best First'.
Re^2: XML Simple
by jettero (Monsignor) on Jan 25, 2010 at 21:29 UTC

    I like the look of XML::Rules, but I read the pod, rather than searching here. It looks like a smarter attempt at what I was going for in CQ.

    -Paul

      There's a few examples on PerlMonks and the explanation of the ideas that brought it to life. It seems to get to what you were after from a different angle and as such is probably better in different cases. In case you want just a fairly small subset of the data in the XML and XPath is a good way to select what you want, then CQ will most likely work better :-) If on the other hand you want a bigger part of the data and the resulting structure is more complex then the XML::Rules' style will probably end up being more readable. Plus it allows you to execute code at any level to trim or massage the data structure further.

      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://819494]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-03-29 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found