realbasic-nug
[Top] [All Lists]

Crashing the XML Engine

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Crashing the XML Engine
From: Jason Essington <jasone at GreenRiverComputing dot com>
Date: Tue, 31 Aug 2004 14:07:47 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
O.K. why does this:

Dim xml As new XmlDocument()

Dim element as XmlElement = xml.CreateElement("hash")
xml.AppendChild(element)

Dim hash as String = MD5("any string will do")
element.AppendChild(xml.CreateCDATASection(hash))

xml.toString() // crashes here

Crash the application? the problem is definitely the MD5sum, but why is it crashing the xml engine. and why is it waiting until toString to crash it? Shouldn't it just whine about some xml spec violation rather than crater the whole application? Is this even an xml spec violation?

Obviously if the hash is base64 encoded then stored in a text node, the xml engine doesn't cause an application crash.

-jason

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>