|
-
June 6th, 2008, 12:36 PM
#1
how to read XML file in Java?
hi
Can anyone tell me how to read XML file?My XML file formate is somehwat like below :
<Root>
<Nodes>
<Node id="1" name="name1" ref="ref1"/>
<Node id="2" name="name2" ref="ref2"/>
</Nodes>
</Root>
How i can read this file? I want to write a function which can give me the value of node. Like ...
String getName("id1") // will return name1
or
String getId("name1") // will return id1
So, depend upnon the value of the node element , it returns the other value of same node.
How i can implement this using JAVA ? Reply ASAP.
Thanks in advance ....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|