on 04-22-2009 9:05 AM
<SOAP-ENV:Body>
<main>
<child>
<string>jfgkjfkjgkNEHA_MITT0497 0000041001000000050 </string>
<string>jhjhjkkjjkNEHA_MITT0498 0000041001000000050 </string>
<string>jhjhjkkjjkNEHA_MITT0498 0000041001000000050 </string>
<string>jhjhjkkjjkNEHA_MITT0498 0000041001000000050 </string>
</child>
</main>
</SOAP-ENV:Body>
Hi,
Am reading the above xml file using the org.w3c.dom.*;
fstNmElmntLst = doc.getElementsByTagName("string");
If I run 668 records at a time it runs fine but above that it throws below error
org.xml.sax.SAXParseException: Illegal character at end of document, <.
Can you please help me out for this problem
Thanks
hi neha,
check this link along with code for further details
http://www.java2s.com/Code/JavaAPI/org.w3c.dom/DocumentgetElementsByTagNameStringtagname.htm
let me know u need any further calrifications
bvr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It didn't help me out Thanks
ServletInputStream input = request.getInputStream();
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(input);
doc.getDocumentElement().normalize();
Am using above code to parse xml file
it gives problem If I run more then 1000 records
Document doc = db.parse(input);//this line throws below exception because of stackoverflow
line org.xml.sax.SAXParseException: Illegal character at end of document,
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.