Re: [xml] Additional text nodes for '\n' in documents with DTD
- From: Daniel Veillard <veillard redhat com>
- To: Nikolay Sivov <bunglehead gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] Additional text nodes for '\n' in documents with DTD
- Date: Tue, 16 Feb 2010 12:59:17 +0100
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.
If so how to tell parser to not create
these text nodes?
You can't. They are in the input, they must be in the output,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel veillard com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]