Previous Page | Next Page

Filtering a GetMetadataObjects Request

Example of Using XMLSELECT and Template Filter Criteria in the Same Method Call

The following is an example of a GetMetadataObjects request that uses an <XMLSELECT> element to filter the initial set of objects that are retrieved, and a template to filter the associated objects:

<GetMetadataObjects>
   <Reposid>A00000001.A5DQTZY5</Reposid>
   <Type>Document</Type>
   <Objects/>
   <NS>SAS</NS>
<!-- OMI_XMLSELECT(128) + OMI_GET_METADATA(256) + OMI_TEMPLATE (4) 
+ OMI_ALL_SIMPLE (8) -->
   <Flags>396</Flags>    
   <Options>
      <XMLSelect search="*[@Name ? 'Customer']"/>
      <Templates>
         <Document Id="" Name="" TextType="">
           <ResponsibleParties search="ResponsibleParty[@Role='OWNER']"/>
         </Document>
      </Templates>
   </Options>
</GetMetadataObjects>

In the request, note the following:

Here is an example of the output from the request:
<!-- Using the GETMETADATAOBJECTS method. -->

<Objects>
   <Document  Id="A5DQTZY5. BN000002" Name="2008 New Customers" 
ChangeState=" " Desc="New customers in the Southwest Region in 2008" LockedBy="" 
MetadataCreated="21Aug2008:21:11:32" MetadataUpdated="21Aug2008:21:11:32" 
PublicType=""  TextRole= ""  TextType="HTML" URI=""  URIType=""   
UsageVersion="0">
<ResponsibleParties SEARCH="ResponsibleParty[@Role='OWNER']">
<ResponsibleParty Id="A5DQTZY5. BE000004" ChangeState=" " Desc=" " LockedBy="" 
MetadataCreated="21Aug2008:21:11:32" MetadataUpdated="21Aug2008:21:11:32"  
Name="Manager" Role="Owner" UsageVersion="0"/></ResponsibleParties>
</Document>
</Objects> 

One Document object was found that included the name Customer in the Name= attribute. One ResponsibleParty object was found that had the Role= attribute value of OWNER.

Previous Page | Next Page | Top of Page