I'm getting the following error while trying to Unmarshal a Document into the
java objects that JAXB generated. The instance document does validate against the schema. Here's the error :
"unexpected root element (uri:"", local:"MyRootElement"). Expected elements are....
I Googled this and found a few responses, most of them pertaining to JAXB 2.0, with no clear answer. I suspect that it has to do with namespaces but don't know what to do. I tried a modification of my instance
doc that removed all the 'xmlns="..."', 'xmlns:xsi="..."', and 'xsi:schemaLocation="..."' attributes and tried to Unmarshall that version but got the same error.
Since we're only using the one main namespace, none of the elements have any namespace prefixes.
Any suggestions?