XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old January 11th, 2002, 05:49 AM
Hoggie Hoggie is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Ireland
Posts: 10 Hoggie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Reading XML doc using JDOM problem

Hello,

I have an xml doc eg:
- <report>
- <sub_report>
<date required="Yes">Friday, January 11, 2002(0830)</date>
<heading>Report BLAH</heading>
- <sub_heading>
<sub_heading_name>Customer</sub_heading_name>
</sub_heading>
- <sub_heading>
<sub_heading_name>Number</sub_heading_name>
</sub_heading>
- <sub_heading>
<sub_heading_name>Counterparty</sub_heading_name>
</sub_heading>
- <data_row>
<data>BLAH</data>
<data>100</data>
<data>AAA Ltd.</data>
</data_row>
- <data_row>
...
</data_row>
</sub_report>
<sub_report>
...
</sub_report>
...
</report>

So each report has a sub_report. The problem I am getting is that when I use Jdom to extract the data from the xml doc, it looks at the first sub_report it meets and proceeds to parse though it. Once finished it comes out, sees "sub_report" again and parses the same sub_report it just came from again, and not going on to the next one!

I realise I could make matters easier by labeling the sub_report like such, sub_report1, sub_report2, sub_report3... but for other reasons (XSLT hic-cups) I would rather keep it the way it is.

If anyone has used Jdom extensively and perhaps has an answer to making it skip over roots it has done before with the same name then please let me know.

Thanks in advance!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Reading XML doc using JDOM problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway