Possible Duplicate:
What Java XML library do you recommend (to replace dom4j)?
I have been googeling for some days now and can’t seem to find the right answer to my challenge.
This is what the items in my xml file looks like.
<Item ItemNo="319097" Name="PCB SIO_1" Value="" Config="1" />
I would like to take every single part of this item line and break down into strings like this:
String ItemNo = "319097";
So that I can create a string array that consists of the values in side the “” in the item node of the XML file.
Is this possible?
In advance thanks for helping me.
The cleaneast way would be to unmarshall the XML using Jaxb or something like Xstream : you create a Java object that represent your XML and then Jaxb will create an object and populate it with the XML values.
An example for your XML would be :