Idempotent XML processing
mccutchen at gmail.com
Fri Aug 19 19:11:12 CEST 2005
> In my current project, I am working with XML data in a protocol that has
> checksum/signature verification of a portion of the document.
> the server sends me XML with empty elements as full open/close tags,
> but toxml() serializes them to the XML empty element (<Element/>), so
> the checksum winds up not matching.
(This is a horrible response to your question, so I apologize in
Does it even make sense to use a checksum to verify XML, since there
are basically infinite ways to validly write equivalent XML data?
I would think the only way that a checksum would be a viable way to
verify a document is if you had some sort of standard normalized
format, and made sure the data was normalized both before you computed
and before you calculated the checksum. That way, you would be sure
that, for instance, all insignificant whitespace was removed and all
empty elements were represented uniformly.
Again, I'm sorry because I didn't provide any real useful information,
I just tried to poke holes in your current project.
 Unless all of your whitespace is significant
More information about the Python-list