Validate
Validating an XML document is important if it is going to be used in an application.
You can validate it in two ways, using Document Type Definition (DTD), or XML
Schema Document (XSD). XMLTask in SSIS can do it both ways.
XPATH
You can query an XML document using XPATH and evaluate the result.
XSLT
Rendered on a web page, an XML document is not pretty. An HTML page can be
made pretty using tags, or CSS. You can convert an XML document to another
format, say HTML, using this task for which you will need a document that can do
this conversion for you. This conversion is the XSL transformation, which you define
in another document called an XSL document.
In the two exercises, later in this chapter, we will be looking at Diff and XSLT task
types of XML Task.
XML Documents Used in This Chapter
In this section, we will look at the different documents that we will be using, and
where they are stored on the machine. The XML documents used in the exercise
are files that have been used earlier (http://hodentek.blogspot.com/2007/07/
simple-xml-file-aka-my-hello-world-for.html). Although the XML files used
in this chapter are stored in the default directory of the local IIS, which is usually,
C:\Inetpub\wwwroo, they can be stored in any directory and IIS.
Chapter 11
[ 177 ]
Copy the XML documents (webstudentsOK.xml and webstudentsOK2.xml, and
webstudents.xsl) and save them in any folder of your choice.
The results shown in this chapter, however, assume the files are stored in
C:/inetpub/wwwroot
Documents Used for Diff XMLTask Type
The webstudentsOK.
Pages:
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134