Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] bug in insertChild?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: T Benjamins <davidbowie2nl AT yahoo.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] bug in insertChild?
  • Date: Mon, 10 Aug 2009 08:01:08 -0700 (PDT)

Hi all,

I'm running XOM 1.2.1 and i have problems running the folloing code:



for
Node tempNode = newMVHElement.copy();
babElement.insertChild(tempNode, insertMVHIndex);
}
 
i want to insert a certain Node as a new child to babElement.
When i run this code, it gets appended at the 3rd position instead of the
5th, (probably because my node array children of an Element
contain Text(\n\t) and Node objects, so it gets inserted at position 5 in the
array, but apparently that's position 2  
) When i multiply the desired insertion index by 2 it works as expected.

This is  a bug? Or am i dong something horribly wrong in loading the
document??

greetings,

Tom(intinsertMVHIndex = 5,i = 1; i <= babprsmvhSize; i++,insertMVHIndex++) {







Archive powered by MHonArc 2.6.24.

Top of Page