<?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: Update XML File in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505190#M681145</link>
    <description>JRF, I don't know Perl , can you make a script using Perl ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan</description>
    <pubDate>Tue, 29 Sep 2009 21:23:18 GMT</pubDate>
    <dc:creator>Allanm</dc:creator>
    <dc:date>2009-09-29T21:23:18Z</dc:date>
    <item>
      <title>Update XML File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505186#M681141</link>
      <description>&lt;BR /&gt;We have a certain set of tools in production that need to be access controlled through an xml file. &lt;BR /&gt;&lt;BR /&gt;The format of the xml file is attached and I need a way to automate the update to this xml file when a user needs to be added and removed.&lt;BR /&gt;&lt;BR /&gt;There are some 15 tools and the scenarios to consider here while adding a user is that - &lt;BR /&gt;&lt;BR /&gt;1) User that needs a limited set of access to a few tools and not all.&lt;BR /&gt;2) Super user with all the access (*)&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Sep 2009 19:44:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505186#M681141</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-09-29T19:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Update XML File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505187#M681142</link>
      <description>Hi Allan:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I need a way to automate the update to this xml file when a user needs to be added and removed.&lt;BR /&gt;&lt;BR /&gt;And so what do you want updated and/or deleted?  Do we presume the '&lt;USER name=""&gt;&lt;/USER&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 29 Sep 2009 20:26:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505187#M681142</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-09-29T20:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Update XML File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505188#M681143</link>
      <description>Yes that's correct JRF!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Allan.</description>
      <pubDate>Tue, 29 Sep 2009 20:35:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505188#M681143</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-09-29T20:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update XML File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505189#M681144</link>
      <description>Hi Allan:&lt;BR /&gt;&lt;BR /&gt;I would certainly use Perl.  CPAN has a number of XML parsing modules to do the heavy lifting.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 29 Sep 2009 20:50:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505189#M681144</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-09-29T20:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Update XML File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505190#M681145</link>
      <description>JRF, I don't know Perl , can you make a script using Perl ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan</description>
      <pubDate>Tue, 29 Sep 2009 21:23:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505190#M681145</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-09-29T21:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update XML File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505191#M681146</link>
      <description>JRF , &lt;BR /&gt;&lt;BR /&gt;I figured a way to design this and implement in bash ... &lt;BR /&gt;&lt;BR /&gt;Plan to have a few intermediate files before the actual xml is uploaded.&lt;BR /&gt;&lt;BR /&gt;One of the intermediate files would be a xml template file which has the required XML for adding a user. This template file would have sample data which would be replaced by "sed -e" and populated to a txt file and appended to the target xml access file.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Sep 2009 00:29:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505191#M681146</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-09-30T00:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Update XML File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505192#M681147</link>
      <description>Hi Allan:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I figured a way to design this and implement in bash ...Plan to have a few intermediate files before the actual xml is uploaded.  One of the intermediate files would be a xml template file which has the required XML for adding a user. This template file would have sample data which would be replaced by "sed -e" and populated to a txt file and appended to the target xml access file.&lt;BR /&gt;&lt;BR /&gt;That sounds like a viable solution.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 30 Sep 2009 11:20:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505192#M681147</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-09-30T11:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Update XML File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505193#M681148</link>
      <description>Hi JRF/All,&lt;BR /&gt;&lt;BR /&gt;I was able to make the script and got it working, Can you review it and suggest any improvements in coding.&lt;BR /&gt;&lt;BR /&gt;I am not very happy with the multiple sed's, can you modify in someway so that I can avoid multiple sed's.&lt;BR /&gt;&lt;BR /&gt;Attaching the script for your perusal.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan</description>
      <pubDate>Tue, 06 Oct 2009 22:01:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505193#M681148</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-10-06T22:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Update XML File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505194#M681149</link>
      <description>The other thing that bothers me is that I am solving for adding one user only-&lt;BR /&gt;&lt;BR /&gt;Currently this is how it works &lt;BR /&gt;&lt;BR /&gt;1) Gets the user that needs to be added along with the tools that he will have access to from a file(1).(wget and get the file1)&lt;BR /&gt;&lt;BR /&gt;2) I replace the values in a template file(2)  ( which is currently has fields for one user only) with the values from file(1) and generate a append file(3).&lt;BR /&gt;&lt;BR /&gt;3)The append-file is appended to the target xml file(4).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This solves for adding a user but not for deleting or any other scenario - lets say a user who is already added needs access to few more tools or he needs to be deleted.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My question is how can I make changes to make current script so that if I get file(1) with multiple users it can handle that and generates a brand new XML file instead of appending it.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Oct 2009 23:32:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/update-xml-file/m-p/4505194#M681149</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-10-06T23:32:57Z</dc:date>
    </item>
  </channel>
</rss>

