This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Java in General and the fly likes DocumentBuilder parse call fails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "DocumentBuilder parse call fails" Watch "DocumentBuilder parse call fails" New topic

DocumentBuilder parse call fails

liliya woland
Ranch Hand

Joined: Apr 11, 2006
Posts: 134
I have an InputStream iStream. I cat view the characters in it when I do a while-loop.
So I want to put this iStream into a DocumentBuilder builder.
When I do the following

I get an error "org.xml.sax.SAXParseException: Premature end of file."
Could someone please tell me what I could do different here to parse iStream?
Thanks a lot.
subject: DocumentBuilder parse call fails