Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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: 19747

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!