Chapter 3. Administration 75
3.3.3  Tips on using the ARSXML command
If you are not familiar with the syntax of the ARSXML command, an easier way to begin is to 
perform an export of the object. By doing so, you get a working XML input file that you can 
modify to suit your needs. Ensure that the export is successful without any errors; otherwise, 
the output XML file might be incomplete.
Adding objects to the Content Manager OnDemand server is straightforward. If you are 
performing more advanced operations, such as updating the permission of an existing user 
for an application group or folder, and you are not getting the results that you are expecting, 
the task attribute might be missing. Y ou must include this attribute when you want to update 
an existing object, such as removing a user’s permission from an application group or 
updating a user’s permission to an application group. The values for the task attribute are add, 
delete, and update.
For example, if you want to remove the permission of the user User1 from an application 
group, you must use the following line in the input XML file:
<permission user="User1" task="delete" />
Another example is when you want to update the query restriction of the user User1 for the 
application group CreditCardAG. In this case, you must use the following line in the input XML 
file, with the task attribute set to update.
<permission user="User1" task="update" queryRes="account='000-000-000'" />
The previous line is incorporated in Example 3-3 for the input file updateag.xml.
Example 3-3   Input file updateag.xml
<?xml version="1.0" encoding="UTF-8"?>
<onDemand xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:noNamespaceSchemaLocation="../ondemand.xsd">
<!-- update application group with query restriction-->
  <applicationGroupname="CreditCardAG" >
<permission user="User1" task="update" queryRes="account=’000-000-000'" />
  </applicationGroup>
</onDemand>
The following command updates the query restriction for user User1:
arsxml update -h odserver -i updateag.xml -v  -u User1 -p /my/stash/pwfile
Example 3-4 shows the output from the previous command. 
Example 3-4   Successful output of updating the query restriction for user User1
ARS6822I Attempting login for userid 'User1' on server 'hodserver'
Updating applicationGroup, CreditCardAG
Update of applicationGroup, CreditCardAG was successful.
Updating applicationGroup-permission, CreditCardAG-User1
Update of applicationGroup-permission, CreditCardAG-User1 was successful.
Finished processing file updateag.xml.