You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by dara <da...@risaris.com> on 2006/01/10 13:56:22 UTC

Re: white spaces on deleting a node

Swetha Nekkanti wrote:

> Hi,
>
>  I am facing a small problem when I delete a node from an XML DOM.
> When,I delete one or more nodes  from the DOM and I serialize the 
> resulting DOM,I get white spaces in the parts where the nodes were 
> deleted.
>
>  Does anyone know how to remove these white spaces and why does this 
> happen?
>
> Thanks,
> Swetha
>
>
Hi Swetha,

A  DOM created from parsing includes all white spaces as text nodes 
unless you suppress it on the parsing.

There is an option via a parser setting to ignore 'ignorable' white 
spaces. (e.g. spaces/line-breaks between elements).

There is also an option on the DOM writer to suppress output of these 
entries.

Regards

Dara

-- 
Regards,

Dara Mulvihill,

Rísarís Ltd,

http://www.risaris.com

++353 404 64009