[jdom-interest] Problem with DOMOutputter
Jason Hunter
jhunter at collab.net
Thu Mar 1 11:15:01 PST 2001
If you can send in a reproducible test case (code snippet and XML
snippet) we can diagnose what's happening.
In the meanwhile, perhaps it would help that the insertBefore() code
generating the exception in Xerces is this:
if((type == Node.ELEMENT_NODE && docElement != null) ||
(type == Node.DOCUMENT_TYPE_NODE && docType != null)) {
throw new
DOMException(DOMException.HIERARCHY_REQUEST_ERR,
"DOM006 Hierarchy request
error");
-jh-
"Lesniak, Alex" wrote:
>
> Hello,
>
> I'm trying to use the DOMOutputter and keep getting the following error:
>
> org.jdom.JDOMException: Exception outputting Document: DOM006 Hierarchy
> request error
> at org.jdom.output.DOMOutputter.output(DOMOutputter.java:168)
> at
> com.thomson.cms.comsub.proxy.message.MessageTest.doTest(MessageTest.java:45)
>
> at
> com.thomson.cms.comsub.proxy.message.MessageTest.main(MessageTest.java:69)
> Root cause: org.w3c.dom.DOMException: DOM006 Hierarchy request error
> at
> org.apache.xerces.dom.DocumentImpl.insertBefore(DocumentImpl.java:381)
> at org.apache.xerces.dom.NodeImpl.appendChild(NodeImpl.java:216)
>
> at org.jdom.output.DOMOutputter.output(DOMOutputter.java:144)
> at
> com.thomson.cms.comsub.proxy.message.MessageTest.doTest(MessageTest.java:45)
>
> at
> com.thomson.cms.comsub.proxy.message.MessageTest.main(MessageTest.java:69)
>
> I'm using JAXP with a recent Xerces CVS snapshot version of
> DocumentBuilderFactory.
> With Xerces 1.3, I just get a null document from the outputter and no
> exceptions.
>
> I have tried this with Crimson, and it works.
>
> Is this a bug in Xerces, or a bug in JDOM? I've seen some discussion of
> similar problems on the
> mailing list and in the archives, but I haven't found a satisfactory
> solution to the problem (using
> Crimson is not an option, so I need to use Xerces.)
>
> Any ideas would be appreciated. I would be happy to post this to the Xerces
> list if this is not a
> JDOM issue.
>
> Thank you in advance for your respose,
>
> -- Alex
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
More information about the jdom-interest
mailing list