[Tutor] Writing to XML file with minidom
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,
> 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.
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*)
> Hope this helps!
Tremendously. Thanks, Danny!
More information about the Tutor