Re: [xml] Additional text nodes for '\n' in documents with DTD



On 2/16/2010 14:59, Daniel Veillard wrote:
On Sat, Feb 13, 2010 at 07:17:52PM +0300, Nikolay Sivov wrote:
I've just run into a problem I don't understand - when I parse a
document with dtd and
line returns '\n' in the content that followed dtd tree get
additional text nodes for each '\n'.

Inline example shows that. test2 produces text nodes -<doc>  has 3
children (direct of course),
but<doc>  from test1 has only one.

Note that without dtd I got the same trees in both cases.

Is it expected behavior?
   yes, spaces outside of markup constructs are significant and must be
reported to the application.
Ok, thanks but it's not exactly what was question about =). Why is this affected by dtd presence? It could be easily verified with this example - if I remove dtd in both cases I get <elem> as a first child of
root element. This is strange.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]