Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by joyeux (Initiate)
on Nov 20, 2012 at 13:16 UTC ( #1004713=note: print w/replies, xml ) Need Help??


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

Hi tobyink, thank u so much for ur help..

1.This is my xml document

<Order>
<Date>2003/07/04</Date>
<CustomerId>123</CustomerId>
<CustomerName>Acme Alpha</CustomerName>

<Item>
<ItemId> 987</ItemId>
<ItemName>Coupler</ItemName>
<Quantity>5</Quantity>
</Item>
<Item>
<ItemId>579</ItemId>
<ItemName>Clasp</ItemName>
<Quantity>1</Quantity>
</Item>
</Order>

2.my output should be
Date:2003/07/04
CustomerId:123...etc..like this

3.i have to select the element nodes without having to
specify their names..and retrieve the element
data value..in the same order as the elements in xml document

could plz help me for this..

  • Comment on Re^2: hi i want to retrieve the element and values from xml document

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004713]
help
Chatterbox?
[Corion]: A good daystart to everybody!
[Corion]: Just a quick poll - is anybody actively relying on https://perlmonks. pairsite.com/? I plan to retire that URL in favour of moving all our servers onto the same HTTPS certificate for perlmonks.{com, net,org}
[Corion]: Actually bsd_glob '{www.,}perlmonks .{com,net,org}', plus css.perlmonks.org I think
[Corion]: Sad that Let's Encrypt does not allow wildcard certificates, but they could be somewhat of a hassle to verify

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2017-09-26 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (292 votes). Check out past polls.

    Notices?