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 (Abbot)
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
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: hi i want to retrieve the element and values from xml document
Select or Download Code

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 contemplating the Monastery: (6)
As of 2014-09-30 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (385 votes), past polls