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 Swetha Nekkanti <sn...@cs.columbia.edu> on 2005/12/18 21:39:30 UTC
white spaces on deleting a node
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
Re: white spaces on deleting a node
Posted by dara <da...@risaris.com>.
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