[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
why whitespace counts as a node?
- From: Thufir Hawat <hawat.thufir@gmail.com>
- To: xml-dev@lists.xml.org
- Date: Sat, 13 Nov 2010 10:29:26 +0000 (UTC)
When parsed, why is whitespace counted as a node? It might just be my
Java bias, but I would greatly prefer the idea of a Tree mapping 1-1 to
XML. However, with whitespace counting, then the resulting XML text file
all mushed together.
At least that's my understanding. When parsing XML the parser must
determine whether or not interpret whitespace as a node or not, so that
different parsers will give different results. Shouldn't the goal be for
their to be a single correct representation for a given document? So
long as whitespace counts, then it depends upon the parser to either
include or not include the whitespace.
Is the choice to have whitespace count perceived of as design flaw, or
does it server a purpose?
-Thufir
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]