XML output in java

I have a problem with my java program! I have a xml file that looks like this:

<command type="Hello">

<name id="Peter">

</name>

</command>

Now I want to get just the Hello and Peter out of the file. The other stuff I don't need. Haven't found anything jet which helps. Thanx Yogi

[349 byte] By [Jgerhardt] at [2007-9-26 4:44:06]
# 1
you need to parse the xml in order to obtain the data you want. You can use SAX or DOM
wilmort at 2007-6-29 18:32:02 > top of Java-index,Archived Forums,Java Programming...
# 2
You can do it by using XML Apirefer to http://java.sun.com/xml/tutorial_intro.html orwww.developerlife.comHIH!!
insoft at 2007-6-29 18:32:02 > top of Java-index,Archived Forums,Java Programming...
# 3
You can do it by using XML Apirefer to http://java.sun.com/xml/tutorial_intro.html orwww.developerlife.comHIH!!
insoft at 2007-6-29 18:32:02 > top of Java-index,Archived Forums,Java Programming...
# 4
You can do it by using XML Apirefer to http://java.sun.com/xml/tutorial_intro.html orwww.developerlife.comHIH!!
insoft at 2007-6-29 18:32:02 > top of Java-index,Archived Forums,Java Programming...
# 5
You can do it by using XML Apirefer to http://java.sun.com/xml/tutorial_intro.html orwww.developerlife.comHIH!!
insoft at 2007-6-29 18:32:02 > top of Java-index,Archived Forums,Java Programming...
# 6
You can do it by using XML Apirefer to http://java.sun.com/xml/tutorial_intro.html orwww.developerlife.comHIH!!
insoft at 2007-6-29 18:32:02 > top of Java-index,Archived Forums,Java Programming...
# 7
You can do it by using XML Apirefer to http://java.sun.com/xml/tutorial_intro.html orwww.developerlife.comHIH!!
insoft at 2007-6-29 18:32:02 > top of Java-index,Archived Forums,Java Programming...