List Info

Thread: SV: selecting text nodes with xpath..




SV: selecting text nodes with xpath..
user name
2006-05-05 10:51:41
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.Matzuramogul.com]
Skickat: fr 2006-05-05 11:53
Till: userxmlbeans.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-unsubscribexmlbeans.apache.org
For additional commands, e-mail: user-helpxmlbeans.apache.org
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )