aspose file tools
The moose likes XML and Related Technologies and the fly likes Solution fro the error:org.xml.sax.SAXParseException- Content is not allowed in prolog. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "Solution fro the error:org.xml.sax.SAXParseException- Content is not allowed in prolog." Watch "Solution fro the error:org.xml.sax.SAXParseException- Content is not allowed in prolog." New topic
Author

Solution fro the error:org.xml.sax.SAXParseException- Content is not allowed in prolog.

rajashree loganayagi
Greenhorn

Joined: Apr 12, 2011
Posts: 20
Hi,

I write an xml code to read a file from a folder. But i got this type error: org.xml.sax.SAXParseException-Content is not allowed in prolog.

How can i rectify this... Help me Please ASAP...


William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12324
    
    1
That is usually due to the file NOT starting with a < character. Leading spaces or line feeds are a good bet.

How was the file created?

Bill

Java Resources at www.wbrogden.com
rajashree loganayagi
Greenhorn

Joined: Apr 12, 2011
Posts: 20
Thank U.... It happens all because of the space present before <character. Now i rectified it.. Thanks for your valuable suggestion.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Solution fro the error:org.xml.sax.SAXParseException- Content is not allowed in prolog.
 
Similar Threads
Content is not allowed in prolog
JSTL XML tags
ADMIN , NODE MANAGED SERVER ERROR
xml parer error
XML Schema Validation.