jcplerm wrote:
I noticed that whenever an element of an XML document is removed by
means of an XUpdate remove command, blank spaces are left in place of
the removed element.
My application does lots of XUpdate removes and appends on medium sized
XML docs. As I result I will end up with large documents containing lots
of spaces.
For example, assuming this is the original XML doc:
<doc>
<elem1>xxxx</elem1>
<elem2>xxxx</elem2>
</doc>
After removing elem2 and adding elem3 this is how that doc would look
like after exporting it to a flat text file:
<doc>
<elem1>xxxx</elem1>
<elem2>xxxx</elem3>
</doc>
For relatively static documents, it's not a problem.
But even for small docs, if they are extensively through a similar
process, they might grow too large, unnecessarily.
Could this be considered a bug and be properly fixed?
Or is there a straightforward workaround?
If you're manipulating the DOM, have you tried Node.normalize()? It
likely does what you want. There may be an appropriate place to use
this within Xindice, but I'm not sure where in the code this would
be applied.
Murray
...........................................................................
Murray Altheim http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK .
"There's a lot of intelligence out there that you don't
know if it's true or not." -- Anonymous US official
http://news.bbc.co.uk/1/hi/world/middle_east/3014850.stm