You can learn a lot about XML and Windows by executing the following command sequence on any modern Windows (2000 or newer) desktop or server machine:
cd c:\ dir *.xml /s >> xmlfiles.txt
For convenience, we assume that C: is the Windows boot drive (if in doubt, try resolving the %SystemDrive% or %SystemRoot% environment variables or simply type set at the command line). In fact, running this command on my current Windows XP desktop machine produces a listing of nearly 500 files across a wide variety of directories — so many of them in fact that we decided to break this story into two parts. This first part deals with XML files related to Microsoft operating systems, tools or applications. The next XML tip will deal with other files outside the Microsoft company umbrella.
How does one tell which files pertain to Microsoft matters, and which do not? Your first clue comes from where a file resides. Those familiar with Windows file structures will immediately recognize certain directories as more likely to contain files from Microsoft than other vendors, such as elements of the …\Windows or …\Windows\System32 directories. Also, because XML is a plain text based markup language you can always open any XML file inside notepad or some other text editor to see what it says about itself inside (most files are pretty good about identifying themselves in that way).
As we browsed through the contents of xmlfiles.txt, we came across numerous elements that you'll probably find on your systems too. For convenience, readability and possible reference use, we list these file names (or file descriptors, when wildcards come in handy) in alphabetical order in Table 1-1. For brevity, we also omit the .xml file extension. One hint to help keep your lookup time under control: Stay away from the XML files in the …\Temporary Internet Files\… folders. They're not usually of much interest for Windows spelunking anyway.
Table 1-1: A sampling of Microsoft XML files
|<random>||...\Microsoft\Office\ONetconfig||MS Office Network config data|
|ACTOC||...\Microsoft Office\Office 11\1033||MS Office Access operation & appearance controls|
|(many other similar files and control items here)|
|CDLIST||...\Office 11\SAMPLES\INFOPATH...||Sample XML documents drive InfoPath examples|
|ConnectionManager||...\Windows Media Connect 2||Communications & protocol settings for Media|
|ConsumerCommands||...\Microsoft.NET\Framework\v1.1...||Runtime security policy and application fix settings|
|CONTEXT .||..\Office 11\HTML\XMLLINKS||Help, debug, environment & more settings data|
|Control||...\Local Settings\Temp||Info about Windows Media download & setup|
|CSS*DATA various||...\Office11\VS Runtime dirs||Stylesheet descs & metadata for markup display|
|DESIGNER||...\Microsoft Office\Office 11||MS Office component config and environment files|
|(many other similar files in this directory)|
|Filters .||..\Movie Maker\...||Pre-defined sound and image Movie Maker filters|
|GroupedProviders||...\Microsoft.NET\Framework\v2.0…||ASP.NET SQL provider info & settings|
|INFTOC||...\Office 11\... & various update dirs||InfoPath table of contents and settings info|
|MSOSEC||...\Microsoft Office\Office 11\ADDINS||Microsoft Office Security Policy settings|
|Outlook||...\Application Data\Microsoft\Outlook||Outlook state information, shortcuts, links|
|SKU011.||..\MSOCache\... (and other locations)||License info about MS Office 11 (2003)|
|System.xml||location varies in ...Windows\Assembly...||Defines the standard namespace for XML processing|
|VBOWCTOC .||..\Microsoft Shared\Web Components\...||MS Office Web components VB reference|
|WMSDKNS||...\Windows Media\9.0 or ...\10.0||Windows Media 9.0 or 10.0 config settings|
In directories with multiple XML files, we listed only the first item, but that shouldn't hamper your ability to locate such files. We also listed only the first 20 entries of interest we found, simply to keep the length of this discussion sufficiently brief.
By looking into these various XML files you can learn a lot about the way applications, interfaces and the operating system itself is configured and how it saves state information from invocation to invocation. Microsoft has clearly taken the easy-to-read, easy-to-parse and easy-to-store nature of XML to heart and uses it for all kinds of controls and status information.