Hi,
I don't known if this is the expected behaviour or not, but this result
strange for me:
I have this code
NodeList childs = this.doc.getDocumentElement().getChildNodes();
System.out.println("Size = " + childs.getLength());
for(int i=0; i<childs.getLength(); i++) {
Node child = childs.item(i);
System.out.println((i+1)+"/"+childs.getLength()+" - "
+child.getNodeName());
}
and the output is
Size = 10
1/10 - node1
2/10 - node2
3/10 - node3
4/10 - node4
5/10 - node5
6/10 - node6
7/10 - node7
8/10 - node8
9/10 - node9
10/10 - node10
Well, this is correct, no problem, but if I append any child to other
element the output is not the same
NodeList childs = this.doc.getDocumentElement().getChildNodes();
System.out.println("Size = " + childs.getLength());
Element parent = this.doc.createElement("parent");
for(int i=0; i<childs.getLength(); i++) {
Node child = childs.item(i);
System.out.println((i+1)+"/"+childs.getLength()+" - "
+child.getNodeName());
parent.appendChild(child);
}
the output now is
Size = 10
1/10 - node1
2/9 - node3
3/8 - node5
4/7 - node7
5/6 - node9
This is for me not the expected result, this is a bug/problem or the
problem is only mine that don't know the real behaviour of xerces? ;)
TIA,
--
Daniele Madama
Pro-netics s.r.l.
Via Elio Lampridio Cerva 127/c
Roma
Tel. 0651530849
http://www.pro-netics.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]