domxml_open_mem concatenating siblings

R

Redge Ogden

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top