Hi All, I have a scenario where I should edit an xml file. I should change an element's value based on another element's value.
I should change <root> <hosts> <direct_virtual_host> <name>RG0001_Down111</name> <description/> <administrative_state>Enabled</administrative_state> </host> </root> to <root> <hosts> <direct_virtual_host> <name>RG0001_Down111</name> <description/> <administrative_state>Disabled</administrative_state> </host> </root> i.e., if <name> contains a value RG0001_Down111, then the value of <administrative_state> should be changed as "Disabled". There are many occurrences like this in the same file and again the output should be read to another file. Any help is appreciated. regards, -ramesh P Save a tree...please don't print this e-mail unless you really need to Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com