Re: DOM Parsers, Canonical XML

>Am I correct in assuming that all DOM parsers have the ability to
>output the parsed XML in Canonical XML format?

A DOM parser outputs the parsed XML as a DOM, without performing any
canonicalization upon it. At this time, the DOM has _no_ standardized
ability to output the parsed document  XML text format, canonicalized or
not.

Some parsers and some DOMs may have a canonicalize operation or option. But
there's no portable way to make that request.

Routines which read data from a DOM and output canonical XML are available.
For example, the Xerces/XML4J/XML4C parser comes with a sample program
called DOMWriter which offers canonicalizing as an option. If you care
about portability, your best bet  for now is to incorporate that sort of
code into your own application rather than assuming it will be provided for
you.

As far as I know, canonicalizing in the DOM itself is not on the Open
Issues list. Personally I'm inclined to consider it an operation upon the
document rather than something that a document model should handle, but I'm
open to arguments pro and con.

______________________________________
Joe Kesselman  / IBM Research

Received on Wednesday, 24 May 2000 11:22:15 UTC