Novell Home

Using an XML Attribute as a Policy Builder Nodeset

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 19 Jan 2006
 

Problem

A reader wrote about the following issue:

"I'm trying to create a nodeset contained in a variable for further use in the Policy Builder. From there, I want to process each node for deletion of accounts from groups in AD."

And here's the response from Father Ramon, Patron(izing) Saint of DirXML ...

Solution

Below are three different examples of reading and using an XML attribute as a nodeset from Policy Builder. The examples read the filter on the driver object but can be easily adapted to read from XmlData on a DirXML-Stylesheet or DirXML-Rule object.

docfunction1 reads that attribute using a token, then converts the base64 to characters and parses using the XmlDocument class. This would be the equivalent of a stylesheet that does a query, a base64 decode, and a parse.

docfunction2 uses the the XML parser directly by passing it the URI of the object/attribute. This is the equivalent to using the document() function in a stylesheet.

docfunction3 is the same as docfunction2 except that it caches the document so it only has to be read once. This is much more efficient than reading it every time, but also means that you have to restart the driver if you change the table.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell