Re: Elementtree and CDATA handling

2005-06-15 Thread Fredrik Lundh
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

Re: Elementtree and CDATA handling

2005-06-04 Thread uche . ogbuji
"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

Re: Elementtree and CDATA handling

2005-06-01 Thread and-google
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

Re: Elementtree and CDATA handling

2005-06-01 Thread Terry Reedy
"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" >>>>

Re: Elementtree and CDATA handling

2005-06-01 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > There are two problems: the //

Elementtree and CDATA handling

2005-06-01 Thread alainpoint
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