How do I consult a XML document?

P

Piotre Ugrumov

I have this document XML(1). I must consult this document that is I have an
ID and I search this ID in the document XML, if I find the ID I receive the
other information(nome, opere, periodo data and vicini) For do this thing I
have search a tutorial for Java & XML, but I have found only tutorila to
validate, to write o to do other thing more complicated.
Where can I find aan example for consulting an XML?
I don't want modify the document in any way.
Thanks.

(1)
<museo>
<stanza>
<id>0</id>
<nome>ingresso</nome>
<opere>
<periodo></periodo>
<opera></opera>
</opere>
<vicini>1</vicini>
<vicini>5</vicini>
<vicini>4</vicini>
</stanza>

<stanza>
<id>1</id>
<nome>stanzaa</nome>
<opere>
<periodo>900</periodo>
<opera>a</opera>
</opere>
<vicini>0</vicini>
<vicini>2</vicini>
</stanza>
<museo>
 
C

Christophe Vanfleteren

Piotre said:
I have this document XML(1). I must consult this document that is I have
an ID and I search this ID in the document XML, if I find the ID I receive
the other information(nome, opere, periodo data and vicini) For do this
thing I have search a tutorial for Java & XML, but I have found only
tutorila to validate, to write o to do other thing more complicated.
Where can I find aan example for consulting an XML?
I don't want modify the document in any way.
Thanks.
Hello,
try one of the following links:

http://java.sun.com/xml/tutorial_intro.html
http://www.cafeconleche.org/books/xmljava/

<snip xml>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top