16
Tips and Tricks / ARSXML - Some tips and info
« on: April 05, 2022, 10:32:15 AM »
Had a question recently,
Yes and ARSXML to the rescue.
In default location C:\Program Files\IBM\OnDemand\V10.5\xml\samples are dozens of xml samples.
For this case there is this xml file, updateusers.xml:
If I want to see all of the possible attributes that can be changed via ARSXML I can take a look at C:\Program Files\IBM\OnDemand\V10.5\xml\ondemand.xsd.
In there I see:
Also, one can do an export and then look at the resultant xml.
That will give a basic example of how one might structure xml when wanting to do adds or updates.
Ed
Quote
We need to change the userIDs of many users. Can this be done in bulk?
Yes and ARSXML to the rescue.
In default location C:\Program Files\IBM\OnDemand\V10.5\xml\samples are dozens of xml samples.
For this case there is this xml file, updateusers.xml:
Quote
<!-- Change the user name -->
<user
name="SampleUser3"
newName="SampleUser3New">
</user>
If I want to see all of the possible attributes that can be changed via ARSXML I can take a look at C:\Program Files\IBM\OnDemand\V10.5\xml\ondemand.xsd.
In there I see:
Quote
<xs:element name="user">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="permission" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="task" type="taskString" use="optional"/>
<xs:attribute name="user" type="stringLen1-128" use="optional"/>
<xs:attribute name="group" type="stringLen1-128" use="optional"/>
<xs:attribute name="adminAuthority" type="yesnoString" use="optional"/>
</xs:complexType>
</xs:element>
</xs:choice>
<xs:attribute name="name" type="stringLen1-128" use="required"/>
<xs:attribute name="newName" type="stringLen1-128" use="optional"/>
<xs:attribute name="uid" type="uidValue" use="optional"/>
<xs:attribute name="updateDate" type="xs:string" use="optional"/>
etc etc
Also, one can do an export and then look at the resultant xml.
That will give a basic example of how one might structure xml when wanting to do adds or updates.
Ed