Terry Reedy wrote:
>> the above are six ways to write the same string literal in Python.
>
> Minor nit: I believe 'hell' + 'o' is two string literals and a runtime
> concatenation operation.
I guess I should have written "constant".
on the other hand, while the difference might matter for curre
"If, instead, you want to keep track of where the CDATA sections are,
and output them again without change, you'll need to use an
XML-handling interface that supports this feature. Typically, DOM
implementations do - the default Python minidom does, as does pxdom.
DOM is a more comprehensive but le
Alain <[EMAIL PROTECTED]> wrote:
> I would expect a piece of XML to be read, parsed and written back
> without corruption [...]. It isn't however the case when it comes
> to CDATA handling.
This is not corruption, exactly. For most intents and purposes, CDATA
sections should behave identically to
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> you're confusing the external representation of something with the
> internal
> data model.
>
> consider this:
>
>>>> "hello"
>>>> 'hello'
>>>> "hell\x6f"
>>>> "hell\157"
>>>> "hell" + "o"
>>>>
[EMAIL PROTECTED] wrote:
> There are two problems: the //
I am experimenting with ElementTree and i came accross some
(apparently) weird behaviour.
I would expect a piece of XML to be read, parsed and written back
without corruption (except for the comments and PI which have purposely
been left out). It isn't however the case when it comes to CDATA
handli