I'm parsing through an XML document:
private
String filename = "C:\\XML.xml";
private void initialize() {
String xmlData = HelperUtl.readXmlFile( filename );
xmlData = ( XmlDataDcl )xmlObject.parse( xmlData, null, plan );
retrieveCurrentPlan();
}
When running a
JUnit test, it throws the following error:
"Call to parse XML Failed"
Cause by: org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
I can't figure out why this is happening. Here is the XML file (everything is formatted correctly - I'm using Oxygen)
EDIT: SEE XML BELOW
I've searched for answers on google and other people had this problem because their editor was open, the
doc wasn't formatted correctly, or it didn't have this:
<?xml version="1.0" encoding="UTF-8"?>
at the top. i've tried everything, no dice. any help would be appreciated.
[ November 14, 2007: Message edited by: James McKee ]
[ November 14, 2007: Message edited by: James McKee ]