djspiewak/anti-xml — Issue #82: Zipper issue replacing nested element
Author: bheap
Created: 2012-02-20 21:37:02+00:00
State: open

Hi. I am using antixml 0.3. I am having trouble with modifying the tree using Zippers.

Using original xml:

and an injectable element:

foo
bar

I can modify the tree using:

val replace = (original \\ 'replace) filter (item => item.attrs("id").contains("bar"))
replace.updated(0, insert).unselect

However if I swap the origin xml to:

and run the same search and replace code things go awry.

It could just be me, but I could not find a mailing list to dig deeper.

Thanks for your help.