• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Simple question for XML Gurus

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to parse an xml schema for ELEMENT_NODE and build a Tree from these .
How do I proceed ?
Thanks
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is like you want to use an English grammar to build an English novel on it. It is NOT exactly accurate analogy, but you've got my idea anyway.
You probably can make an example from it, and that is probably not very hard, but why to waste time on it, IMHO.
You are welcome to try, and prove I'm totally wrong. I would be more than happy to accept it.
 
raphael Bereh
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May be I did not explain well.
I am building a JTree from the DOM and the objective is to strip out all Text elemments that the parser see as being the xml file elements.
Example :
<xml ..>
<test>
<my_real_element_one>
There is no element betwee this one and the root
</my_real_element_one>
</test>
</xml>
Hope this makes it clear !
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry! The question does not make a lot of sense to me. It looks like a HW assignment.
JTree does not grow naturally like most trees in the rain forest. JTree is built by your own code, you can put or choose not to put anything on it.
[ November 12, 2002: Message edited by: Roseanne Zhang ]
 
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Raphael,
Please look at the following link -
https://coderanch.com/t/146641/po/certification/over-DOM
It gives an example as to how to use the DOM API in Java. Please go through the content of the program in the above link and you should get a very fair idea as to how to proceed.
reply
    Bookmark Topic Watch Topic
  • New Topic