Lucian Cosoi wrote:
>
> 2008/11/11 minggi
>
>>
>> I tried to parse the following xml:
>> <person>
>> <name>test</name>
>> <tel>test</tel>
>> <city>test</city>
>> </person>
>>
>> The getFirstChild on the 'person' node returns a #text node. The parser
>> adds
>> a empty text node.
>> I tried with setIgnoringElementContentWhitespace(true) and
>> setIgnoringElementContentWhitespace(false)... nothing works.
>>
>> Have you an example for me?
>>
>> thanks
>> --
>> View this message in context:
>> http://www.nabble.com/Ignore-Whitespace-tp20435351p20435351.html
>> Sent from the Xerces - C - Users mailing list archive at Nabble.com.
>>
>
> I found checking the node type when unserializing satisfactory:
>
> if ((currentNode->getNodeType() == DOMNode::TEXT_NODE) /*empty text node /
> newline*/
> || (currentNode->getNodeType() == DOMNode::COMMENT_NODE) /*comment*/)
> {
> // skip uninteresting nodes
> continue;
> }
>
> Best regards,
> Lucian
>
>
Thanks for the answer.
Is there no simple possibility to solve that problem with the Parser?
Minggi
--
View this message in context:
http://www.nabble.com/Ignore-Whitespace-tp20435351p20436025.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.