Embedding comments in your XPATH Filters

July 20, 2010

One thing I love to do is provide self-documenting code and configurations. Well when I have to customize sets the XPATH filter can get a bit complex so I recently found a way to comment the XPATH Filter in my sets and groups:

/Person[starts-with(DisplayName,'%')]

By using to enclose my comments and only after the last closing ] of the predicate I can comment on the filter itself.

The following will error (don’t put the comment inside the predicate [].

/Person[starts-with(DisplayName,'%') <!– Only with DisplayName -–> ]

http://feeds.feedburner.com/IdentityLifecycleManagerilmBestPractices