creating a report from XML using DOM

Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2005
Posts: 14
Reputation: nisaa15 is an unknown quantity at this point 
Solved Threads: 0
nisaa15 nisaa15 is offline Offline
Newbie Poster

creating a report from XML using DOM

 
0
  #1
Mar 10th, 2006
HI,
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?


<shops>
<shop number="1">
<address>
<street>Rigby Lane</street>
<town>Houghton</town>
</address>

<items>

<item number="11">
<itemname>Black Coat</itemname>
<description>long coat</description>
<price>15.99</price>
<stocklevel>12</stocklevel>
</item>

<item number="12">
<itemname>Jumper</itemname>
<description>DKNY wool</description>
<price>40.99</price>
<stocklevel>7</stocklevel>
</item>

<item number="13">
<itemname>Gloves</itemname>
<description>blue gloves</description>
<price>0.99</price>
<stocklevel>23</stocklevel>
</item>
</items>
</shop>

<shop number="2">

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

<items>
<item number="14">
<itemname>Boots</itemname>
<description>Ankle</description>
<price>35.00</price>
<stocklevel>2</stocklevel>
</item>

<item number="15">
<itemname>Tights</itemname>
<description>denier 60</description>
<price>5.49</price>
<stocklevel>19</stocklevel>
</item>

</items>
</shop>
</shops>
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1
Reputation: pice23 is an unknown quantity at this point 
Solved Threads: 0
pice23 pice23 is offline Offline
Newbie Poster

I Kiss The Only One I Love.

 
0
  #2
Oct 12th, 2006
Hi
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 917
Reputation: linux is an unknown quantity at this point 
Solved Threads: 27
linux's Avatar
linux linux is offline Offline
Posting Shark

Re: creating a report from XML using DOM

 
0
  #3
Oct 13th, 2006
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.
Toshiba M1151.49 GB DDR-2 RAM1.6 GHz Centrino Duo80GB HDDWindows XP Media Center Edition
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 3,239
Reputation: The Dude will become famous soon enough The Dude will become famous soon enough 
Solved Threads: 25
The Dude's Avatar
The Dude The Dude is offline Offline
Nearly a Senior Poster

Re: creating a report from XML using DOM

 
0
  #4
Oct 14th, 2006
I also got PM spam from him (And reported it)
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 4,159
Reputation: happygeek is on a distinguished road 
Solved Threads: 13
Administrator
Staff Writer
happygeek's Avatar
happygeek happygeek is offline Offline
He's The Daddy

Re: creating a report from XML using DOM

 
0
  #5
Oct 14th, 2006
pice23 has now been officially warned about the PM spam stuff...
Davey Winder
Information Security Journalist of the Year
www.happygeek.com
Follow me on Twitter: @happygeek
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 72
Reputation: cyfm is an unknown quantity at this point 
Solved Threads: 1
cyfm cyfm is offline Offline
Nw Media Expert

Re: creating a report from XML using DOM

 
0
  #6
Oct 14th, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 3,239
Reputation: The Dude will become famous soon enough The Dude will become famous soon enough 
Solved Threads: 25
The Dude's Avatar
The Dude The Dude is offline Offline
Nearly a Senior Poster

Re: creating a report from XML using DOM

 
0
  #7
Oct 16th, 2006
Originally Posted by happygeek
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)
Last edited by The Dude; Oct 16th, 2006 at 9:26 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC