On 2/19/2010 12:06 AM, Matthias Hopfer wrote:
Hi there,

Is there any way to tell xerces to ignore whitespaces within text-nodes?

<IndxEvt  TimeStampEvt="2010-02-18 11:40:42">
vs
<IndxEvt TimeStampEvt="2010-02-18 11:40:42">
This is not whitespace in a text node, it's whitespace in markup. This kind of whitespace is not part of the infoset, and the parser doesn't distinguish between the two.


parser->setIncludeIgnorableWhitespace ( false );
parser->setIncludeIgnorableWhitespace ( true );

does make no difference.
Or is there any combination of features to be set?

Any hints?
For the parser to know that whitespace is ignorable, you need a DTD that defines an element's content as element-only, and you need to validate the document with that DTD.

Dave

Reply via email to