You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Dan Durkin <dd...@scilearn.com> on 2005/09/28 20:24:19 UTC
parsing a document with no namespace
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
progress-unit@http://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: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org