sk.uniba.euromath.tools.xml.sax
Class AttributeReplacer
java.lang.Object
sk.uniba.euromath.tools.xml.sax.AttributeReplacer
public final class AttributeReplacer
- extends Object
Replaces selected attribute with given name and value.
- Author:
- Martin Vysny
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttributeReplacer
public AttributeReplacer()
createReplacer
public static Attributes createReplacer(Attributes atts,
QName replace,
QName replaceWith,
String attrValue)
- Constructs new attribute replacer. If
replace attribute is
not amongst the attributes then atts is simply returned.
- Parameters:
atts - all calls are delegated here. Attribute with name equal to
replaceWith parameter, present in atts is
ignored.replace - attribute to be replaced. Prefix part is ignored.replaceWith - the new attribute name. Prefix is required. If
null then the replace attribute is removed.attrValue - attribute's new value.
- Returns:
- instance of attributes, with replaced attribute.
createDeleter
public static Attributes createDeleter(Attributes atts,
QName delete)
- Constructs new attributes instance with given attribute deleted.
- Parameters:
atts - the attributes list.delete - delete this attribute.
- Returns:
- instance of attributes with given attribute deleted. If
delete is not amongst attributes then atts
is simply returned.
Copyright 2003-2003-2006 null. All Rights Reserved.