[Home] [By Thread] [By Date] [Recent Entries]

  • From: Kurt Cagle <kurt.cagle@g...>
  • To: John Cowan <cowan@m...>
  • Date: Mon, 21 Feb 2011 12:10:24 -0500

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 <cowan@m...> wrote:
Kurt Cagle scripsit:

> // 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>)"}

I don't understand what the purpose of the "xml(...)" wrapper is.
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                        cowan@c...
from the walking tree                           http://www.ccil.org/~cowan
       --first line of a non-existent poem by:         John Cowan



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member