<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: find and replace xml tag value in file extended in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480333#M680348</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I will prefer to update perl code , acuatlly i have many xmls that has one tab called which may contains &lt;HTTP or="" https="" urls="" that="" i="" need="" to="" replce.=""&gt;&lt;/HTTP&gt;&lt;BR /&gt;Hope James R. can help me in this regard if he is able to see my case.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
    <pubDate>Mon, 17 Aug 2009 10:45:44 GMT</pubDate>
    <dc:creator>GOPI KRSNA</dc:creator>
    <dc:date>2009-08-17T10:45:44Z</dc:date>
    <item>
      <title>find and replace xml tag value in file extended</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480330#M680345</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I am just extending the thread started by diwakar with my query. &lt;BR /&gt;James R. Ferguson have replied that &lt;BR /&gt;# perl -pe 's{(&lt;ATTACHMENTURLPREFIX&gt;http://)(.+)(&lt;/ATTACHMENTURLPREFIX&gt;)}{$1www.dummy.com$3}g' file  &lt;BR /&gt;&lt;BR /&gt;By using this perl code we can find and replace partciular tab value in xml file. This is working fine for me also. I want to add some more check like it should also replace url which are staring with https/HTTP/HTTPS(Case sensitive..) so can any one help me how to add OR condtion in this?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Gopi&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Aug 2009 04:08:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480330#M680345</guid>
      <dc:creator>GOPI KRSNA</dc:creator>
      <dc:date>2009-08-17T04:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: find and replace xml tag value in file extended</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480331#M680346</link>
      <description>&lt;P&gt;&amp;gt;I am just extending the thread started by diwakar with my query.&lt;BR /&gt;&lt;BR /&gt;It would have been helpful to provide the URL:&lt;BR /&gt;&lt;A target="_blank" href="http://forums.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1250505319934+28353475&amp;amp;threadId=1351538"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1351538&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;With sed, you just provide two "-e 's///g'".&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2011 03:54:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480331#M680346</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-29T03:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: find and replace xml tag value in file extended</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480332#M680347</link>
      <description>I prefer to use HP UX command sed:&lt;BR /&gt;&lt;BR /&gt;cat your_file | sed 's/HTT/HTTPS/'</description>
      <pubDate>Mon, 17 Aug 2009 10:00:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480332#M680347</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-08-17T10:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: find and replace xml tag value in file extended</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480333#M680348</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I will prefer to update perl code , acuatlly i have many xmls that has one tab called which may contains &lt;HTTP or="" https="" urls="" that="" i="" need="" to="" replce.=""&gt;&lt;/HTTP&gt;&lt;BR /&gt;Hope James R. can help me in this regard if he is able to see my case.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Aug 2009 10:45:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480333#M680348</guid>
      <dc:creator>GOPI KRSNA</dc:creator>
      <dc:date>2009-08-17T10:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: find and replace xml tag value in file extended</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480334#M680349</link>
      <description>You can always do "OR" commands :)&lt;BR /&gt;&lt;BR /&gt;perl -pe "s/(&lt;ATTACHMENTURLPREFIX&gt;(http|https):\/\/)(?:[^&amp;lt;]+)(&amp;lt;\/Attachmen&lt;BR /&gt;tURLprefix&amp;gt;)/$1www.dummy.com$3/g" test.txt&lt;BR /&gt;&lt;BR /&gt;(http|https) can be extended just by adding pipes and the keyword.&lt;BR /&gt;If you by some reason would want to match the old url as well you can remove ?: in (?:[^&amp;lt;]+) and $3 will become that address ($4 will be &lt;/ATTACHMENTURLPREFIX&gt;&lt;BR /&gt;Output looks like this.&lt;BR /&gt;V0001&amp;gt; perl -pe "s/(&lt;ATTACHMENTURLPREFIX&gt;(http|https):\/\/)(?:[^&amp;lt;]+)(&amp;lt;\/Attachmen&lt;BR /&gt;tURLprefix&amp;gt;)/$1www.dummy.com$3/g" test.txt&lt;BR /&gt;&lt;ATTACHMENTURLPREFIX&gt;&lt;A href="http://www.dummy.com" target="_blank"&gt;http://www.dummy.com&lt;/A&gt;&lt;/ATTACHMENTURLPREFIX&gt;&lt;BR /&gt;&lt;ATTACHMENTURLPREFIX&gt;&lt;A href="https://www.dummy.com" target="_blank"&gt;https://www.dummy.com&lt;/A&gt;&lt;/ATTACHMENTURLPREFIX&gt;&lt;BR /&gt; &lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson&lt;/ATTACHMENTURLPREFIX&gt;</description>
      <pubDate>Mon, 17 Aug 2009 13:43:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480334#M680349</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2009-08-17T13:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: find and replace xml tag value in file extended</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480335#M680350</link>
      <description>Hi Fedric,&lt;BR /&gt;&lt;BR /&gt;It is giving me error like :&lt;BR /&gt;&lt;BR /&gt;sh: 1: Parameter not set.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 17 Aug 2009 14:03:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480335#M680350</guid>
      <dc:creator>GOPI KRSNA</dc:creator>
      <dc:date>2009-08-17T14:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: find and replace xml tag value in file extended</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480336#M680351</link>
      <description>Hi Gopi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; sh: 1: Parameter not set.&lt;BR /&gt;&lt;BR /&gt;Change the double quotes that enclose the command line script to single ones when you run a Perl script from a Unix shell:&lt;BR /&gt;&lt;BR /&gt;# perl -e '...'&lt;BR /&gt;&lt;BR /&gt;...instead of:&lt;BR /&gt;&lt;BR /&gt;# perl -e "..."&lt;BR /&gt;&lt;BR /&gt;...which is what silly Windows wants.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 17 Aug 2009 14:18:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480336#M680351</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-08-17T14:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: find and replace xml tag value in file extended</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480337#M680352</link>
      <description>Hi James R. , Fedric&lt;BR /&gt;&lt;BR /&gt;Many thanks it is resolved now.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Aug 2009 14:37:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480337#M680352</guid>
      <dc:creator>GOPI KRSNA</dc:creator>
      <dc:date>2009-08-17T14:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: find and replace xml tag value in file extended</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480338#M680353</link>
      <description>James, was actually running it under OpenVMS :P&lt;BR /&gt;&lt;BR /&gt;But yeah, single quotes :)&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson</description>
      <pubDate>Mon, 17 Aug 2009 21:29:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-xml-tag-value-in-file-extended/m-p/4480338#M680353</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2009-08-17T21:29:30Z</dc:date>
    </item>
  </channel>
</rss>

