|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
XML Awk : Urgent
Hi All,
I am a beginner to Unix. So would really appreciate if people out here can help me out. I have a XML file which has a element <NoteData> in which two values DBHA and DAKO. I need to search these in all the XML files in a directory and if found in the XML file then replace the below location element value either with DBHA or DAKO as what is contained in the XML element <NoteData>. I need to make sure that the value substituted happens only in the first Location element. <?xml version="1.0" encoding="ISO-8859-1"?> <XmlInterchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="XML Schema" Version="1"> <InterchangeInfo> <Date>2008-10-17T07:17:40.5870000+02:00</Date> <Source> <EnterpriseCode>DFD</EnterpriseCode> <CompanyCode>BRE</CompanyCode> <OriginServer>DEV</OriginServer> <LoginName>anker.hansen</LoginName> <LoginUserEmailAddress>anker.hansen@dsv.com</LoginUserEmailAddress> </Source> <Target /> <EDIOrganisation EDICode="00010973" OwnerCode="00010973"> <OrganisationDetails> <Name>DSV Air & Sea GmbH LKW</Name> <Location Country="Germany" City="Bremen">DEBRE</Location> <Addresses> <Address AddressType="MAIN"> <AddressLine1>Knowledge Center Seafreight</AddressLine1> <AddressLine2>Schlachte 15-18</AddressLine2> <AddressCode>Knowledge Center Seafreig</AddressCode> Thanks & Regards Karan |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
Your example doesn't have <NoteData>....
|
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
That element can be anywhere in the data
|
|
#4
|
||||
|
||||
|
This thread closed because OP opened another thread on same issue.
|
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hi Urgent | yhacks | Programming | 5 | 05-28-2008 05:24 AM |
| Need Urgent Help!!! | Furqan_79 | Shell Programming and Scripting | 3 | 05-24-2008 06:33 PM |
| URGENT,URGENT- Need help tape drive installation | sriny | UNIX for Advanced & Expert Users | 3 | 11-16-2006 02:43 PM |
| URGENT---URGENT--No OK PROMPt after RSC CONFIG | sriny | Solaris | 7 | 10-29-2006 10:06 AM |
| urgent help | Yabanci | Shell Programming and Scripting | 1 | 03-08-2005 03:38 PM |
|
|