[Expat-discuss] CRLF conversion question
Fred L. Drake, Jr.
fdrake at acm.org
Wed Sep 8 00:35:27 CEST 2004
On Tuesday 07 September 2004 06:18 pm, Armin Bauer wrote:
> Sorry if its me being stupid but why do CDATA sections contain nodes at
> all? As far as my understanding goes the parser has not to touch the
> cdata section at all.
The node structure is defined by whatever API is providing you with nodes
(Expat isn't). If you're using a DOM with wbxml (or if wbxml is using a DOM
internally), that's why nodes are used.
Line-end normalization is required at all times, even inside CDATA marked
sections. CDATA marked sections are not intended as an escape hatch for
binary data.
> wouldnt it be correct if it created exactly one text node containing all
> the text as is? At the moment it creates a lot of nodes for every line
> etc.
What's correct depends on the API. If these are DOM nodes, then yes, that
would be correct, but not required for correctness. The series of nodes
would also be correct. That's a separate issue from line-end normalization.
> wbxml is the library that converts syncml request to wap binary xml ( a
> form of conversion before it is send over gprs) :)
Cool, I guess. Is it this one?
http://libwbxml.aymerick.com/
The tree described in the documentation looks *very* DOMish to me, though
perhaps a little lighter than a full W3C DOM (hard to be heavier!).
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
More information about the Expat-discuss
mailing list