I have
parsed same XML file in Java 1.4 and Java 1.5
But java
1.4 shows desired result but Java 1.5 gives
"
org.xml.sax.SAXParseException: Content is not allowed in prolog"
error....
I think that the a node along with childnodes cannot convert into String here..............
How I handle this case so that it is compatable in both version or atleast Java 1.5.............which are the api ( s ) I have to use to handle this case in Java 1.5 .........
Java 1.4 code is something like this where the same code gives error in Java 1.5........
String str = list.item(0).toString() ; // here list is an object of NodeList
Document xmlDoc = builder.parse( new InputSource( new StringReader (str)); // here builder is an object of DocumentBuilder