Hello,

When using JAXP API with SAX parser(xerces), how can I manipulate the XML file?
Specifically, how can I change an attribute value of an element?

I could reach the element and print its value, but failed to find a method to change it.

Can anyone please help me?

Thanks in advance.

Here is a code fragment..........
______________________________________________
public void startElement(String namespace, String eleName, String raw, Attributes attributes) throws SAXException{
if(attributes!=null){
for(int i=0;i<attributes.getLength();++i){
if(attributes.getLocalName(i).equals("credrating")){
credrating=attributes.getValue(i);
attributes.setValue();
}
designation="not good";
if((attributes.getLocalName(i).equals("good"))&&(attributes.getValue(i).equals("Yes")))
designation="good";
}
}
}
}

_____________________________________________

I wanted to change the value of the attribute "creditrating"