![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to get data from xml files tags(from data tags) | pvr_satya | Shell Programming and Scripting | 9 | 08-16-2008 10:19 AM |
| data base update | mleplawy | Shell Programming and Scripting | 1 | 05-31-2008 08:35 AM |
| Update NIS+ data | djunerup | SUN Solaris | 0 | 03-26-2008 11:37 AM |
| How to compare data in two flat files and update them? | rajus19 | Shell Programming and Scripting | 3 | 11-08-2005 11:13 AM |
| Removing leading and trailing spaces of data between the tags in xml. | jhmr7 | UNIX for Dummies Questions & Answers | 2 | 05-18-2005 11:27 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to update data between xml tags
Is there a way to modify Non Null data between <host> and </host> tags to a new value ?- may be using sed/awk?
I tried this sed 's|.*<host>\(?*\)</host>.*|\<host>xxx</host>|' but it is updating the host which has null value - want opposite of this - Thanks in advance for you help!! For Example: <node>node1</node> <host>178.23.43</host> <node>node2</node> <host></host> <node>node3</node> <host>usilsunny1</host> <node>node4</node> <host> </host> should modify to <node>node1</node> <host>NewHostHame</host> <node>node2</node> <host></host> <node>node3</node> <host>NewHostHame</host> <node>node4</node> <host></host> |
![]() |
| Bookmarks |
| Tags |
| tag, update |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|