File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XML file error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML file error" Watch "XML file error" New topic

XML file error

vendikonda sravan
Ranch Hand

Joined: May 09, 2010
Posts: 38

i am getting problem sayin Content is not allowed in prolog. in the fallowing file
I have tryd changing
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-16"?>
Still it show ing the same error.

sravan V
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

It's nothing to do with the encoding declaration. There's a dash before the start tag of your root element, see line 6 in what you posted. Get rid of that.
I agree. Here's the link:
subject: XML file error
It's not a secret anymore!