aspose file tools*
The moose likes XML and Related Technologies and the fly likes Simple question for XML Gurus Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Simple question for XML Gurus" Watch "Simple question for XML Gurus" New topic
Author

Simple question for XML Gurus

raphael Bereh
Ranch Hand

Joined: Jan 15, 2002
Posts: 79
I want to parse an xml schema for ELEMENT_NODE and build a Tree from these .
How do I proceed ?
Thanks


SCJP,SCJD,SCBCD
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
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

Joined: Jan 15, 2002
Posts: 79
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

Joined: Nov 14, 2000
Posts: 1953
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 ]
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
Raphael,
Please look at the following link -
http://www.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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple question for XML Gurus