You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Bartolomeo Nicolotti <bn...@siapcn.it> on 2010/08/03 16:47:06 UTC
XmlCursor set/getTextValue not working for me
Hello,
I'm trying to use this code to replace character "à" with "a'":
XmlCursor cursor = xmlObj.newCursor();
while( !cursor.toNextToken().isNone() ){
switch( cursor.currentTokenType().intValue() ){
case TokenType.INT_TEXT:
case TokenType.INT_ATTR:
{
String strval = cursor.getTextValue();
strval = strval.replaceAll("à","a'");
try{
cursor.setTextValue( strval );
}catch(IllegalStateException e){
//discard this
}
}
}
}
but the document remains unchanged, what's my mistake?
Many thanks
Best regards
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org