xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Hodges <harmo...@swbell.net>
Subject Re: Why is "#document" an illegal name?
Date Wed, 18 Oct 2000 23:51:59 GMT

----- Original Message -----
From: "Sean Kelly" <kelly@ad1440.net>
To: <general@xml.apache.org>
Sent: Wednesday, October 18, 2000 6:03 PM
Subject: Re: Why is "#document" an illegal name?


> > I'm trying to create a document using
> > DOMImplementation.createDocument(namespaceURI, qualifiedName, docType).
I
> > get a "DOM002 illegal character" exception because the name I pass in is
> > "#document", which is the name DocumentImpl assigned the Document I'm
> trying
> > to recreate.
>
> You're passing "#document" as the qualifiedName parameter?  The # sign is
> illegal in an element name there.
>
> Pass in the name you want to give to the root element instead.

But I don't know the name of the root element when I create the document.
Why does createDocument want the name of the root element?  I don't need the
name of the root element when I create a document through JAXP.

Grrrrr.

I'm beginning to think it is impossible to write clean code that uses DOM.



Mime
View raw message