hi ,
i have an xml that comes in a single, the entire xml file is read as a single line when i open in edit plus or unix. i need to amend the contents of this xml file.
below is the extract from the file
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"><data><IntegratedSite xmlns="http:google.com"><Pattern><BladeSystem><name>SIS</name><alias>SIS</alias><swgRef xmlns:IntegratedSite="http://www.google.com">/IntegratedSite:IntegratedSite/IntegratedSite:Software/IntegratedSite:SoftwareInventory/IntegratedSite:SoftwareGroup[IntegratedSite:prodNo="CXS10138"][IntegratedSite:prodRev="R4L06"]</swgRef>
I need to append <Is> before the occurance of tag <Pattern> ..
i tried the below but it did not work ..
sed -e 's/<Pattern>/<Is><Pattern>/' file >file1.
but it is generating file1 with zero byte for some reason .. Please suggest what could be done here.