Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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?
[jdporter]: I for one think it's kind of ridiculous that people can't ask - here - other people for help just because it involves monetary compensation.
[jdporter]: I think the test for whether to push it to jobs.perl.com should be strict: (a) you're looking for employment, or (b) you're looking to hire an employee or contractor.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2017-03-23 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (278 votes). Check out past polls.