W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1999

Re: How to get info out of DOM tree?

From: <keshlam@us.ibm.com>
Date: Sun, 28 Nov 1999 21:16:28 -0500
To: "Jeff Lu" <jeff@menuweb.com>
cc: www-dom@w3.org
Message-ID: <85256838.000C7E51.00@D51MTA03.pok.ibm.com>
>What DOM API can I use to parse out the content of the
>ProcessingInstruction and the DocumentType?

The example that you gave does not contain a processing instruction. It
contains an XML declaration
     <?xml version="1.0"?>
The XML spec explicitly says that this is not a PI, even though it uses
PI-like syntax. The DOM hasn't yet officially decided whether to treat it
as a pseudo-PI, as fields attached to the Document node, or in some other
way.

DOM Level 2 will add fields to DocumentType to hold the PUBLIC and SYSTEM
IDs. However, it does not yet include any additional storage for the
contents of the DTD. DOM Level 1's NamedNodeMaps for Entities and Notations
will continue to be available in Level 2, but content model issues were
deferred.

If I remember correctly, both issues are expected to be addressed in DOM
Level 3. Until then, you'll have to rely on the nonportable workarounds (if
any) provided by your specific DOM and/or parser.
______________________________________
Joe Kesselman  / IBM Research
Received on Sunday, 28 November 1999 21:16:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT