W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2001

Re: CDATA sections in W3C XML Infoset

From: Philippe Le Hegaret <plh@w3.org>
Date: Wed, 28 Mar 2001 10:32:27 -0500
Message-ID: <3AC2040B.853EC636@w3.org>
To: Richard Lanyon <rgl@decisionsoft.com>
Cc: www-dom@w3.org
Richard Lanyon wrote:
> While I admit that CDATA sections are just syntactic sugar, there
> isn't any way to tell a DOM to automatically convert all its CDATA
> sections to text nodes other than physically looping through the tree
> and converting them yourself. You could do it at parse time, but that
> assumes you have control of the parser, which isn't necessarily the
> case.

DOM Level 3 is addressing this issue (controlling the parser):

To remove CDATA nodes, you'll be able to use the cdata-nodes option.

Speaking of the Load and Save, I was wondering how useful it would
be to create some aliases such as:
 false: do nothing
 true: loads the source XML conforming to the XML Infoset specification.
       This option overrides and sets:
namespaces to true
namespace-declarations to false
external-parameter-entities to false
create-entity-ref-nodes to false
entity-nodes to false
white-space-in-element-content to true
cdata-nodes to false
comments to true
charset-overrides-xml-encoding to true

others options are not specified by the infoset option:

 false: do nothing
 true: loads the source XML conforming to the canonical XML specification.

Received on Wednesday, 28 March 2001 10:32:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:08 UTC