Im relatively new to XML and was wondering how I could use DOM to produce a "per shop" report showing a list of the items available in the given shop (shop 1 first then 2), the item description, stock level and calculate a total value of the stock level from the xml code below? I want to use the shop id as an input to the program. How can I get to the shop element and from there choose the item child?

<shop number="1">
<street>Rigby Lane</street>


<item number="11">
<itemname>Black Coat</itemname>
<description>long coat</description>

<item number="12">
<description>DKNY wool</description>

<item number="13">
<description>blue gloves</description>

<shop number="2">

<street>Polaris Road</street>
<town>High Wikem</town>

<item number="14">

<item number="15">
<description>denier 60</description>



I don't know if this is an old post or not. pice23 has been spamming my PM box, and this above post is also spam. do something, someone.

I also got PM spam from him (And reported it)

pice23 has now been officially warned about the PM spam stuff...

excus me but can you please ban that guy or something as he keeps spamming my pm over and over and I'm getting pissed off.

pice23 has now been officially warned about the PM spam stuff...

Thats very nice ... Most sites if someone Spams someone via PM they are banned straight away... (I hope he doesnt do it anymore)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.