Update: Windows Search and Xml files (on Windows Server 2008)

A while ago, I wrote a blog post on how change how Windows indexed xml files (see: http://blog.sdbonline.com/2011/09/windows-search-and-xml-files.html)

The idea is to let Windows index Xml files as Text files, allow you to search on Xml element tags and attribute names (instead of only element values and attribute values):

Navigate to HKEY_CLASSES_ROOT\.xml\PersistentHandler and change the default value to {5e941d80-bf96-11cd-b579-08002b30bfeb}

See my previous post for a more detailed explanation

This works for Windows 7 and Windows 2008 (R2) (and also on Windows Vista), but for Windows Server 2008 (R2), you will need take a few additional steps:

Add the ‘File Service’ Role if not already added

Add the ‘Windows Search Service’ in the ‘Role Services’ of the ‘File Service’ Role.
Select the locations to index (this can always be modified afterwards)
Modify the registry and rebuild the index
Verify that xml files are now indexed using the ‘plain text filter’
go to ‘Control Panel’ – ‘Indexing Options’. Click advanced, and on the ‘File Types’ tab, verify that the xml extension is using the ‘Plain text Filter’
Make sure to wait for the indexer to complete: on my last test, my test file (in the root folder of my drive) didn’t get indexed until the end
Once completed, you can search for all the content in an xml files as it was a text file (e.g. element tag names will be found)
Note that you can do the same for other file type (e.g. xslt, xsl, …) by modifying the registry for those file types


and set the default value to {5e941d80-bf96-11cd-b579-08002b30bfeb}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>