[Tutor] Writing to XML file with minidom
Travis Spencer
travislspencer at gmail.com
Wed Aug 31 21:22:03 CEST 2005
On 8/31/05, Danny Yoo <dyoo at hkn.eecs.berkeley.edu> wrote:
> Hi Travis,
Hey Danny,
> Putting pure binary bytes in an XML file has a flaw: the issue is that the
> binary bytes themselves might contain characters that could be interpreted
> as XML! Even if we wrap the content in CDATA, there's nothing that really
> stops the bytes from containing the characters "]]>" to prematurely close
> off the CDATA tag.
Oh, sure. I didn't think that through, and if I had, I wouldn't have
know how to work around it.
> To get around this, we can use a technique called "ascii-armor" to wrap
> protection around the troublesome binary text.
>
> http://en.wikipedia.org/wiki/ASCII_armor
Brilliant. I won't forget the term "ascii-armor" if I ever find
myself in Johan's shoes and I've forgotten the details.
> (Hey, look, an Elf! *grin*)
HA!
> Hope this helps!
Tremendously. Thanks, Danny!
--
Regards,
Travis Spencer
More information about the Tutor
mailing list