Hi.
You could use cursors for this.
XmlCursor cur = element.newCursor();
cur.selectPath( "..." );
cur.toNextSelection();
cur.setTextValue( "modified text" );
cur.dispose();
Regards, Mikael.
________________________________
Från: Ole Matzura [mailto:Ole.Matzura mogul.com]
Skickat: fr 2006-05-05 11:53
Till: user xmlbeans.apache.org
Ämne: selecting text nodes with xpath..
Hi!
a small issue; I need to select text nodes with xpath, for
example //myelement/text(). The XmlObject.selectPath method
unfortunately returns the containing element instead, which
gives me problems when I want to change the selected value
since I only want to modify at the text-node level, not at
the element level.. Is there any workaround or am I doing
something wrong?
thanks for any reply!
/Ole
------------------------------------------------------------
---------
To unsubscribe, e-mail: user-unsubscribe xmlbeans.apache.org
For additional commands, e-mail: user-help xmlbeans.apache.org |