xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Hodges <harmo...@swbell.net>
Subject RE: Question about document type nodes and JAXP
Date Wed, 18 Oct 2000 17:22:04 GMT
Really?  That's what I'm doing, but I thought it would just be a temporary
hack.  :-(

> -----Original Message-----
> From: Sean Kelly [mailto:kelly@ad1440.net]
> Sent: Wednesday, October 18, 2000 12:08 PM
> To: general@xml.apache.org; xerces-dev@xml.apache.org
> Cc: xerces-j-dev@xml.apache.org
> Subject: Re: Question about document type nodes and JAXP
>
>
> > OK, how do I get the first instance of DOMImplementation so I can create
> the
> > DocumentType before I create the Document?  I can only find a
> way to get a
> > DOMImplementation if I already have a Document.
>
> Document toss = new org.apache.xerces.dom.DocumentImpl();
> DOMImplementation impl = toss.getImplementation();
> DocumentType type = impl.createDocumentType("root",
>   "-//MyOrg//DTD Root 1.0//EN", http://my.org/root.dtd);
> Document doc = impl.createDocument("rootns", "root", type);
> // then add nodes to "doc"
>
> --Sean
>
>
>
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
>


Mime
View raw message