I always get the error messsage if i try to remove the last child which has its own children elements.
Error Message:
java.lang.IndexOutOfBoundsException
at com.ximpleware.FastLongBuffer.longAt(FastLongBuffer.java:303)
at com.ximpleware.VTDNav.getTokenDepth(VTDNav.java:1232)
at com.ximpleware.VTDNav.getElementFragment(VTDNav.java:1096)
at com.ximpleware.XMLModifier.remove(XMLModifier.java:203)
Implement Code:
XMLModifier modifier = new XMLModifier(nav);
nav.toElement(VTDNav.LC);
modifier.remove();
I always get the error messsage if i try to remove the last child which has its own children elements.
Error Message:
java.lang.IndexOutOfBoundsException
at com.ximpleware.FastLongBuffer.longAt(FastLongBuffer.java:303)
at com.ximpleware.VTDNav.getTokenDepth(VTDNav.java:1232)
at com.ximpleware.VTDNav.getElementFragment(VTDNav.java:1096)
at com.ximpleware.XMLModifier.remove(XMLModifier.java:203)
Implement Code:
XMLModifier modifier = new XMLModifier(nav);
nav.toElement(VTDNav.LC);
modifier.remove();
XML content:
<root>
<NodeA>
<SubNode1/>
<SubNode2/>
</NodeA>
<NodeB>
<SubNode3/>
<SubNode4/>
</NodeB>
</root>
If I remove the children elements of NodeB, then it can be removed.
<root>
<NodeA>
<SubNode1/>
<SubNode2/>
</NodeA>
<NodeB>
</NodeB>
</root>
I think this must be a bug for VTD-XML, and I also try the lastest version 2.5.0, the same problem appear.
will investigate and get back to u
this bug has been fixed...
pls check out vtdNav.java in the repository
let me know if there is any thing else