Python XML API's that preserve XML comments?

Ben Finney bignose+hates-spam at benfinney.id.au
Tue Sep 25 21:24:37 EDT 2007


Dan Stromberg <dstromberglists at gmail.com> writes:

> Are there any python XML parsing API's that preserve comments

(I think you mean "python XML parsing libraries"; it's the library,
not the API, that preserves comments or not.)

I don't have an answer, but this may help to get more information.
The XML 1.0 specification allows for, but does not require, retention
of comments for access by the application:

    2.5 Comments

    [Definition: .... an XML processor MAY, but need not, make it
    possible for an application to retrieve the text of comments. ...]

    <URL:http://www.w3.org/TR/REC-xml/#sec-comments>

-- 
 \     "Demagogue: One who preaches doctrines he knows to be untrue to |
  `\                  men he knows to be idiots."  -- Henry L. Mencken |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list