Re: [xml-dev] XML Redux
The role of xml() is simply to disambiguate the content within the block as being XML rather than being text. In a JSON filter without any XML namespace awareness, it would become the responsibility of the client to parse the XML into some kind of DOM representation, in JAXON this would be a flag used to identify this as intentionally xml content. Otherwise, you would need to know a-priori that this was an XML property, which rather defeats the whole process.
Kurt
On Mon, Feb 21, 2011 at 11:53 AM, John Cowan <[email protected]> wrote:
Kurt Cagle scripsit:
I don't understand what the purpose of the "xml(...)" wrapper is.
> // myJAXON.js
> {"firstname":"John", "lastname":"Cowan", "signature":"xml(<div>It was the
> <i>best</i> of times.<br/>It was the <i>worst</i> of times.</div>)"}
It doesn't make the JAXON valid Javascript+E4X, and it doesn't remove
any ambiguity in the parsing, so why have it?
--
The man that wanders far [email protected]
from the walking tree http://www.ccil.org/~cowan
--first line of a non-existent poem by: John Cowan