Results 1 to 3 of 3
Thread: Print XML tag
- 08-07-2007, 06:27 PM #1
Print XML tag
I have written some java code to Parse an XML file.
It is almost exactly the same as the code here:
A Simple Way to Read an XML File in Java - Print Version
Basically, I have it returning the XML values but what I want to be able to do now is to return the actual tag.
So if we have:
I have the code which will return: 22
Now I need the code to show the actual TAG: <age>
Does anyone know how this can be done????
- 08-07-2007, 06:52 PM #2Senior Member
- Join Date
- Mar 2007
- Rep Power
System.out.println("Age : " + ((Node)textAgeList.item(0)).getNodeValue().trim());
System.out.println("Age : " + ((Node)textAgeList.item(0)).asXMLString().subString(55));
- 08-07-2007, 07:02 PM #3
- By kazitula in forum Java AppletsReplies: 2Last Post: 01-26-2008, 03:05 PM
- By Riftwalker in forum Advanced JavaReplies: 0Last Post: 11-28-2007, 08:28 PM
- By valery in forum New To JavaReplies: 1Last Post: 08-06-2007, 10:51 PM
- By Jack in forum Advanced JavaReplies: 2Last Post: 07-02-2007, 06:40 AM
- By Alan in forum Advanced JavaReplies: 1Last Post: 05-17-2007, 05:05 AM