2.3.2 XML View of Directory Objects

In the XML view of the directory objects presented by ADWS, the XML elements are named for the LDAP classes and attributes used in the directory object. Additionally, XML elements are used to represent the ADWS synthetic attributes, described in the next section.

Begin by defining how a single LDAP attribute and its value(s) are represented in the XML view. Let A be the LDAP display name of an attribute that has values V1(A)...Vn(A). Let S1(A)...Sn(A) be the XML representation of values V1...Vn as described in section 2.3.4. Let LDAPSYN(A) be the LDAP attribute syntax of attribute A, and let XMLSYN(A) be the corresponding XML syntax, as described in section 2.3.4. The XML representation for this attribute is the following.

 <addata:A LdapSyntax="LDAPSYN(A)">
     <ad:value xsi:type="XMLSYN(A)">
         S1(A)
     </ad:value>
     ...
     ...
     <ad:value xsi:type="XMLSYN(A)">
         Sn(A)
     </ad:value>
 </addata:A>

Now extend this view to an entire directory object. Let O be an object in the directory. Let C be the LDAP display name of the most specific structural object class ([MS-ADTS] section 3.1.1.1.4) of O. Let A1...An be the LDAP display names of all the LDAP attributes of O. Then, the representation of O as the XML view in the data model is the following.

 <addata:C>
     <addata:A1 LdapSyntax="LDAPSYN(A1)">
         <ad:value xsi:type="XMLSYN(A1)">
             S1(A1)
         </ad:value>
         ...
         ...
         <ad:value xsi:type="XMLSYN(A1)">
             Sn(A1)
         </ad:value>
     </addata:A1>
     ...
     ...
     <addata:An LdapSyntax="LDAPSYN(An)">
         <ad:value xsi:type="XMLSYN(An)">
             S1(An)
         </ad:value>
         ...
         ...
         <ad:value xsi:type="XMLSYN(An)">
             Sn(An)
         </ad:value>
     </addata:An>
 </addata:C>

Not shown in the above example are the ADWS synthetic attributes. These are shown in the next section.

The root element is named for the LDAP display name of the most specific structural object class of O, and is in the http://schemas.microsoft.com/2008/1/ActiveDirectory/Data XML namespace. When representing an LDAP display name where the most specific structural object class of O is not available, "top" is used for the name of the root element. Additionally, when representing the LDAP rootDse, "top" is used for the name of the root element.

Each child element represents a single LDAP attribute stored on that object and is named for that attribute's LDAP display name (and is also located in the http://schemas.microsoft.com/2008/1/ActiveDirectory/Data XML namespace). This element can have an XML attribute named LdapSyntax that represents the LDAP attribute syntax of that LDAP attribute. Each child element under an attribute represents a single value stored in that attribute. The actual value is represented as a text node under this ad:value element.

The LdapSyntax XML attribute is present for each LDAP attribute specified in a SOAP response, including the above XML representation of a directory object.

The LdapSyntax XML attribute is optional in a SOAP request.

Multiple directory objects are represented as sibling XML elements, regardless of the hierarchical relationship between the objects in the LDAP directory tree.