How to read and Modify an attribute from a XML string

wxdqz

New Member
I am pretty new to XML and I have the following problem.
I have a XML string that represents the XML contents... something like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rhino-threshold-rule PUBLIC \"-//Open Cloud Ltd.//DTD Rhino Threshold Rule 1.0//EN" "http://www.opencloud.com/dtd/rhino-threshold-rule.dtd">
<rhino-threshold-rule config-version="1.0" rhino-version="Rhino (version='1.4.5', release='01-SURAS6', build='200706151028', revision='5804')" timestamp="1182942686136">
<!-- Generated Rhino configuration file: 2007-06-27 13:11:26.133 -->
<threshold-rules active="true" name="SystemFailureABC">
<trigger-conditions name="Trigger conditions" operator="OR" period="500">
.....
</threshold-rules>
</rhino-threshold-rule>


I have a routine that is supposed to modify a XML document. This XML document is in fact a string. I need to modify a specific attribute ("active") belonging to the element "threshold-rules".

I have looked around but could not find what I wanted. Could you please tell me how to do it?
Please, help me.

Thanks
 
Back
Top