Many developers spend a lot of their time in Microsoft Visual Studio .NET 2003, so it makes sense that it should also provide XML functionality. The XML features of Visual Studio .NET 2003 are somewhat basic, but utilizing them may reduce your need to purchase and learn additional tools.
By basic editing, I do mean basic. Editing XML with Visual Studio .NET 2003 is pretty much the same experience as editing XML with a text editor, with a few notable exceptions. The first is the addition of IntelliSense when working with XML files using a known schema. (See Figure 2-1) IntelliSense is the term for the drop down list that appears as you type. This list provides a list of the valid text at any point. The benefit here is that you get feedback as to what is valid, and in many cases, the IntelliSense features also save you many keystrokes. For example, in Figure 2-1, you can see the dropdown includes the valid children of the channel element.
Figure 2-1
IntelliSense helps guarantee a more accurate document in two ways:
q The drop-down list displays only elements that are available while you are typing. This reduces the chance of adding elements at an incorrect location, based on the schema.
q The validation marks (the infamous squiggles) show any items in the XML file that would not validate based on the current schema. They provide a means of detecting these errors without requiring additional external tools or a validation step.
Although Visual Studio .NET 2003 is a capable editor, if you need a lot of advanced functionality for editing or creating XML documents, especially for formats that do not have an XML schema, you might want to look elsewhere.
In addition to creating simple XML files, Visual Studio .NET 2003 supports the creation of W3C XML schemas using either a standard text editor or a graphical designer (see Figure 2-2). Visual Studio .NET 2003 does not support the creation of DTDs, Relax NG, or Schematron schemas.
Figure 2-2
Visual Studio .NET 2003, however, provides great XML support in the creation and accessing of SOAP-based Web Services. See Chapters 20–22 for more details on these features.
The following table provides a summary of Visual Studio .NET 2003's capabilities as an XML editor.
Benefit | Disadvantage |
---|---|
If you develop for Windows, odds are you have it installed already. | Fairly basic XML editing support |
Excellent support for creating and accessing Web Services | Schema support limited to W3C XML schema. |
No support for XSLT debugging. | |
Limited support for many XML grammars, such as DocBook, SVG or XQuery. |