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

Re: hi i want to retrieve the element and values from xml document

by choroba (Chancellor)
on Nov 20, 2012 at 15:44 UTC ( #1004742=note: print w/replies, xml ) Need Help??


in reply to hi i want to retrieve the element and values from xml document

Using xsh, a wrapper around XML::LibXML:
open file.xml ; for //text() { if xsh:matches(., '\S') echo concat(name(..), ':') (.) ; }
Outputs:
Date: 2003/07/04 CustomerId: 123 CustomerName: Acme Alpha ItemId: 987 ItemName: Coupler Quantity: 5 ItemId: 579 ItemName: Clasp Quantity: 1
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2016-09-01 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found