Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > domxml_open_mem concatenating siblings

Reply
Thread Tools

domxml_open_mem concatenating siblings

 
 
Redge Ogden
Guest
Posts: n/a
 
      03-04-2009

Hello
I have an XML file which contains the structure:

<order-item>
<item-code>XYZ</item-code>
<item-name>computer</item-name>
<price>150</price>
<quantity>1</quantity>
</order-item>
<order-item>
<item-code>ABC</item-code>
<item-name>printer</item-name>
<price>250</price>
<quantity>3</quantity>
</order-item>

Please can someone tell me how to use the dom to get a concatenated
version of item-name and quantity, i.e.
computer:1?

I understand how to get a single value using get_elements_by_tagname but
I need to associate the item-name:quantity pairs according to
order-item.

Any advice would be much appreciated.


*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie xpath - select certain siblings iliad XML 4 09-25-2005 10:44 PM
Counting certain preeceding siblings Ian Gibbs XML 2 05-23-2004 03:16 PM
.Re: XPath: how to find out name of preceding siblings Dimitre Novatchev XML 2 02-15-2004 09:39 AM
Q: XPath: how to find out name of preceding siblings nobody XML 4 02-15-2004 07:13 AM
waitFor suspends parent + siblings? Rachel Java 0 10-15-2003 11:09 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57