|
|
|
|
- Using the LDAPListAttribute function
LDAPListAttribute (Example)
Using the LDAPListAttribute function The following example shows how to use LDAPListAttribute recursively. // Find the attributes sListAttributes is string sListAttributes = LDAPListAttribute("MySession", "DC=pcs,DC=local") Â // Find the child elements sListChildren is string sListChildren = LDAPListChildren("MySession", "DC=pcs,DC=local") Â // Recursively find the attributes of the child elements gFindSubChildrenAttributes(sListChildren, sListAttributes)
// ============== recursive use of LDAPListAttribute ============== PROCÉDURE gFindSubChildrenAttributes(sListC, sListA) sChildName is string i is int = 1 sListChildren is string // Add the attributes into the result gsListAttributes += sListA + CR sChildName = ExtractString(sListC, i, CR) WHILE sChildName <> EOT // Find the attributes of the child elements sListAttributes is string sListAttributes = LDAPListAttribute("MySession", sChildName)  // Perform the same operation with the children of the child element  sListChildren = LDAPListChildren("MySession", sChildName) IF sListChildren <> "" THEN gFindSubChildrenAttributes(sListChildren, sListAttributes) ELSE // Add the attributes into the result gsListAttributes += sListAttributes + CR END i += 1 sChildName = ExtractString(sListC, i, CR) END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|