XML manipulation



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


Relevant Pages

  • SUMMARY: Why is passwd prompting root for password?
    ... Why is passwd prompting root for password? ... hosts I checked appeared to have the same pam.conf except this problem host. ...
    (SunManagers)
  • Why is passwd prompting root for password?
    ... I have ONE host where the passwd command is prompting root for a password ... On all other hosts, I can su - to root and issue the passwd command to reset ...
    (SunManagers)
  • RE: Tab to Auto-Complete + ....
    ... > What is need for me to add/do in order for the pressing of Tab to ... > autcomplete a name to work? ... It works fine in root .. ... Computer viruses can be transmitted by e-mail. ...
    (freebsd-questions)
  • RE: SSH attacks?
    ... a BLANK ROOT PASSWORD. ... Subject: SSH attacks? ... Most of the hosts doing the scans seem to be running sshd. ...
    (Incidents)
  • Re: root scp with no ssh login
    ... use ssh key autentication method ($HOME/.ssh/authorized_keys, ... > distributed via rcp with all hosts are known to each other. ... > I wanted to replace the rcp scripts using scp what imho is a good idea. ... > Furthermore I want root to be able to logon to a local console only. ...
    (comp.unix.aix)