return xml;
}
public static String replaceNameInPathOrQuery( String pathOrQuery, String oldName, String newName ) throws Exception
{
Tokenizer t = new Tokenizer();
t.tokenize( pathOrQuery, 0, -1, 1 );
StringBuffer result = new StringBuffer();
int lastIx = 0;
while( t.currentToken != Token.EOF )
{
if( t.currentToken == Token.NAME && t.currentTokenValue.equals( oldName ) )
{
result.append( pathOrQuery.substring( lastIx, t.currentTokenStartOffset ) );
result.append( newName );
lastIx = t.currentTokenStartOffset + t.currentTokenValue.length();
}
t.next();
}
if( lastIx < pathOrQuery.length() )
result.append( pathOrQuery.substring( lastIx ) );
//