Skip to main content

xml parser

No replies
techie22
Offline
Joined: 2008-08-21

Following is contents of my xml file.

<?xml version="1.0" encoding="UTF-8"?>

<?Pub UDT instructions _comment FontColor="red"?>

GMIM Response - 001

content after tags<?Pub Caret1?>
test content prior test
content after

<?Pub *0000001298 0?>

I have to parse the xml file and retrieve the generic tag from xml.

my code is as follows

SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
Document newDocument = (Document) builder.build(inputFilePath);
Element root = newDocument.getRootElement();
System.out.println("root" +root);
List newRootList = newDocument.getRootElement().getChildren();
for(int i=0;i tag
please help me...