Hi,
I really regret the lack of detailed examples about the use of XML
cursors.
Does anyone know links to programs that use XML cursors to go up and
down through
the elements of an XML document, in a very explicit way ?
I have this extract of an XML document:
<father>
....
<something>
<pen>peeeeeeeeen</pen>
<pot>pooooooooooot</pot>
<pile>piiiiiiiiiiiiiiile</pile>
<something>
...
</father>
=================== THIS DOES NOT WORK ===================
XmlCursor c = cursor1.newCursor();
c.toChild("something");
cursor0.toChild("PEN");
String thepen = cursor0.getTextValue(); // works : peeeeeeeeen
cursor0.toNextSibling("pile");
String thepile = cursor0.getTextValue(); // doesnt work, it
returns pooooooooooot instead of piiiiiiiiiiiiiiile
=================== THIS WORKS ==========================
XmlCursor c = cursor1.newCursor();
c.toChild("something");
cursor0.toChild("pen");
String thepen = cursor0.getTextValue(); // works : peeeeeeeeen
cursor0.toParent();
cursor0.toChild("pile");
String thepile = cursor0.getTextValue(); // works :
piiiiiiiiiiiiiiile
Can anyone explain me why cursor0.toNextSibling("pile"); doesnt work ?
Thanks !
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]