You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Jordan C N Chong <ch...@cs.utwente.nl> on 2001/11/14 15:40:59 UTC

How to locate the node?

Dear all,

I am a newbie at this. I have a tree structure, say like this:

                      O                 School
                     / \
                    O   O               Class
                   / \  |
                  O  O  O               Student
			......

Now,  here is the XML document
<School>
   <Class no="1">
      <Student>
		<Name>Michael</Name>
		<ID>0110</ID>
	</Student>
   </Class>
   <Class no="2">
      <Student>
		<Name>William</Name>
		<ID>0111</ID>
	</Student>
      <Student>
		<Name>Freddy</Name>
		<ID>0113</ID>
	</Student>
   </Class>
</School>

My question is, how could I traverse this tree, to locate the Student by
Name "William" (e.g to get his ID number)? In other words, I wish to find
William in this XML. Please give me a hint and some help. Thousand thanks
for all your supports. Wish you all the best.


Regards,
Jordan

Best regards,
--------------------------------------------
Jordan Cheun Ngen, Chong
INF-4067 Universiteit Twente
Postbus 217
7500 AE Enschede
The Netherlands

Distributed and Embedded Systems (DIES)
--------------------------------------------
Office Phone: +31 53 4894655
Web site: http://www.cs.utwente.nl/~chong
Email Add.: chong@cs.utwente.nl
============================================


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org