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?
[Discipulus]: mmh.. i was no strictly thinking to programs; more on some new tutorials
[Discipulus]: but even about programs pm can be a preliminare boiler plate

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2017-09-22 21:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (269 votes). Check out past polls.

    Notices?