Microsoft started using XML in Windows XP, Server Core
makes significant use of XML. In many cases, the files don't even have
an XML extension. Microsoft uses a wealth of file extensions for XML
files today. Any configuration file is likely to use XML. You'll also
find that many log files and even some lower-level operating system data
files all rely on XML. With this change in mind, you really need a good
XML utility to work at the command line, but many of the free products
on the market come up lacking. XML Notepad provides a decent level of
XML support and you'll find that it works just fine for most, if not
all, command line administration needs. You can obtain this utility at http://www.microsoft.com/downloads/details.aspx?familyid=72D6AA49-787D-4118-BA5F-4F30FE913628.
NOTE
Microsoft has
produced a number of versions of XML Notepad. Old versions of XML
Notepad won't install in Server Core. You must download and install XML
Notepad 2007 from the Web site provided in this section in order to
obtain a working copy of XML Notepad. Even XML Notepad 2006 fails to
install in Server Core.
After you install XML
Notepad, the setup program automatically opens an HTML page containing
information about XML Notepad. You'll typically find this file at C:\Program Files\XML Notepad 2007\Readme.htm. One of the links opens a sample XML folder. In this folder you'll find the Basket.XML file that appears in Figure 1. Right-click the file in Windows Explorer and choose Edit with XML Notepad to open the file.
The XML Notepad display
color codes entries by type and includes special icons to identify
various types. For example, value entries appear with a special icon to
differentiate them from elements.
You add a new entry by
selecting it from the Insert menu. As an alternative, you can add new
entries by right-clicking an existing entry and choosing the entry type
from the context menu. In both cases, the new entry appears as a child
of the currently selected entry in the left pane. You type a value for
the new entry in the right pane. When you make a mistake in creating an
entry, such as not adhering to a restriction in an XSD file, XML Notepad
provides an entry in the bottom pane. Double-clicking the error entry
takes you to that position in the file.
If your file has an XSLT processing instruction, you can view the output by clicking the XSL Output tab. The RSS.XML
file provides a sample of this XML Notepad feature. You can change XSL
files by clicking the ellipses button (...) and choosing another XSL
file in the Open dialog box. Click Transform to display the transformed
XML file.
One of the more interesting
features of XML Notepad is the ability to compare two XML files. Begin
by loading the primary XML file into XML Notepad. Choose View
Compare XML Files to display an Open dialog box. Select the secondary
XML file and click Open. You'll see an XmlDiff window open that has a
complete comparison of the two files. This feature is helpful when
performing configuration tasks where you want one machine to have some,
but not all, of the settings of another machine or you need to check XML
files for damage.