Re: Proposal: processing-instructions normalization feature for Document

By the way, if a programmer wants to ignore processing instructions, 
another way to do this today (when it is not an issue of removing them) 
is to use the Treewalker API, which is part of the traversal API, and 
filter appropriately.

Ray Whitmer
rayw@netscape.com

Elliotte Rusty Harold wrote:

>I'd like to propose an additional normalization feature to remove
>processing instructions from the document. The syntax would be modeled
>after the comments feature and be roughly as follows: 
>
>"processing-instructions"
>
>    true
>        [required] (default)
>    Keep Processing instruction nodes in the document.
>    false
>        [required]
>    Discard Processing instruction nodes in the Document.
>
>This could be useful in many cases where programmer 
>know they aren't going to consider processing instructions.
>For example, SOAP explicitly forbids them. Imagine I have
>an existing document, parsed or built from some source I 
>don't control and I want to copy its root element into a
>SOAP request or response. It would be 
>convenient to throw away processing instructions 
>in one normalizeDocument() call rather than having 
>to walk the tree to get rid of them. 
>

Received on Wednesday, 23 January 2002 14:31:04 UTC