This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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: 18708

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.
It is sorta covered in the JavaRanch Style Guide.
subject: XML file error