I'm trying to parse a document with no namespace.
In the javadocs for XmlOptions.setLoadAdditionalNamespaces(), it seems
to indicate that you can map no namespace to a namespace, however, when
I try to do this I get an exception:
org.apache.xmlbeans.XmlException: error: The document is not a
[EMAIL PROTECTED]://scilearn.com/exercise/lrmh/rem: document element
namespace mismatch expected "http://scilearn.com/exercise/lrmh/rem" got ""
Here's a code snippet setting up the XmlOptions and calling the parse
method:
HashMap namespaceMap = new HashMap();
namespaceMap.put("", "http://scilearn.com/exercise/lrmh/rem");
XmlOptions opts = new XmlOptions();
opts.setLoadAdditionalNamespaces(namespaceMap);
ProgressUnitDocument pud = ProgressUnitDocument.Factory.parse(new
java.io.File("test/test.xml"), opts);
Has anyone use this or have any suggestions?
Thanks,
Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]