FileDocCategorySizeDatePackage
ReplaceRule.javaAPI DocExample1381Wed May 18 09:39:04 BST 2005com.discursive.jccook.xml.bean

ReplaceRule

public class ReplaceRule extends org.apache.commons.digester.Rule

Fields Summary
Constructors Summary
public ReplaceRule()

 super(); 
Methods Summary
public voidbegin(org.xml.sax.Attributes attributes)

		Message message = (Message) digester.getRoot();
		
		String repl = attributes.getValue("search");
		String with = attributes.getValue("replace");
		String text = message.getText();
		
		String translated = 
			StringUtils.replace( text, repl, with );
		message.setText( translated );