<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>SpotGnome.com - XSD</title>
    <link>http://www.spotgnome.com/</link>
    <description>Spot the web</description>
    <language>en-us</language>
    <copyright>Guy Levin</copyright>
    <lastBuildDate>Mon, 29 Dec 2008 11:30:46 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>guy@commerix.com</managingEditor>
    <webMaster>guy@commerix.com</webMaster>
    <item>
      <trackback:ping>http://www.spotgnome.com/Trackback.aspx?guid=2c8c1df3-3cc2-4d9f-b185-3ff1f3bfe963</trackback:ping>
      <pingback:server>http://www.spotgnome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.spotgnome.com/PermaLink,guid,2c8c1df3-3cc2-4d9f-b185-3ff1f3bfe963.aspx</pingback:target>
      <dc:creator>Guy Levin</dc:creator>
      <wfw:comment>http://www.spotgnome.com/CommentView,guid,2c8c1df3-3cc2-4d9f-b185-3ff1f3bfe963.aspx</wfw:comment>
      <wfw:commentRss>http://www.spotgnome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=2c8c1df3-3cc2-4d9f-b185-3ff1f3bfe963</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>Validating XML Against XML Schema (XSD)</title>
      <guid isPermaLink="false">http://www.spotgnome.com/PermaLink,guid,2c8c1df3-3cc2-4d9f-b185-3ff1f3bfe963.aspx</guid>
      <link>http://www.spotgnome.com/2008/12/29/ValidatingXMLAgainstXMLSchemaXSD.aspx</link>
      <pubDate>Mon, 29 Dec 2008 11:30:46 GMT</pubDate>
      <description>&lt;p&gt;
XML documents can reference optional documents that specify how the XML documents
should be structured. These optional documents called Documents Type Definitions (DTDs)
and Schemas.
&lt;/p&gt;
There are two kinds of definition for schemas currently: 
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;1. Microsoft XML Schema &lt;/b&gt;
&lt;br&gt;
&lt;blockquote&gt;It uses the extension .xdr (XML-Data Reduced) you can check the attached
files for the this Schema syntax, it is an xml document, but has special elements
and attributes. 
&lt;br&gt;
&lt;/blockquote&gt;&lt;b&gt;2. W3C XML Schema &lt;/b&gt;
&lt;br&gt;
&lt;blockquote&gt;It uses the extension .xsd (XML Schema Definitions) also it is an XML
Document with special elements.&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;The second approach, XSD Schema, has been supported by Microsoft .NET
Framework and is the best approach for .NET developers. Schema files are a special
kind of XML file that define the structure of an XML file via some pre-defined elements
and attributes. 
&lt;p class="MsoNormal"&gt;
Using this Schema file you can validate your XML file to make sure it fits to your
application's needs and validate the inputs in order to prevent any exception in your
code. 
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
The .Net framework gives you all the tools you need so that you can build XSD schemas
and also validate them.
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
First, let's see how can we create a schema using XSD.exe file (It comes with Visual
Studio):
&lt;/p&gt;
&lt;!--Content type: PSDK_8. Transform: everett2mtps.xslt.--&gt;&lt;a name="cpconxmlschemadefinitiontoolxsdexe"&gt;
&lt;!----&gt;&lt;/a&gt; &lt;blockquote&gt;
&lt;p&gt;
The XML Schema Definition tool generates XML schema or common language runtime classes
from XDR, XML, and XSD files, or from classes in a runtime assembly.
&lt;/p&gt;
&lt;p&gt;
The following command generates an XML schema from &lt;code class="ce"&gt;myFile.xml&lt;/code&gt; and
saves it to the specified directory
&lt;/p&gt;
&lt;div class="" id="ctl00_rs1_mainContentContainer_ctl09_"&gt;
&lt;div dir="ltr"&gt;&lt;pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl09" space="preserve"&gt;xsd myFile.xml /outputdir:myOutputDir&lt;/pre&gt;
&lt;p&gt;
Consider that we have the following xml data file &lt;strong&gt;EmployeeList.xml&lt;/strong&gt;:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;EmployeeList&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Company&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;Employee11&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;Employee12&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;Employee13&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Company&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Company&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="2"&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;Employee21&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;Employee22&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;Employee23&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Company&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Company&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="3"&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;Employee31&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;Employee32&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;Employee33&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;Employee34&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Employee&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;Company&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;EmployeeList&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;br&gt;
&lt;br&gt;
&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;
Now, execute XSD.exe on the xml data file:
&lt;/p&gt;
&lt;strong&gt;&gt; XSD EmployeeList.xml&lt;/strong&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
The result xsd file &lt;strong&gt;EmployeeList.xsd&lt;/strong&gt; will be :
&lt;/p&gt;
&lt;span class="kwrd"&gt;&lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;="1.0"&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;="utf-8"&lt;/span&gt;?&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:schema&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="EmployeeList"&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=""&lt;/span&gt; &lt;span class="attr"&gt;xmlns:xs&lt;/span&gt;&lt;span class="kwrd"&gt;="http://www.w3.org/2001/XMLSchema"&lt;/span&gt; &lt;span class="attr"&gt;xmlns:msdata&lt;/span&gt;&lt;span class="kwrd"&gt;="urn:schemas-microsoft-com:xml-msdata"&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:element&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="EmployeeList"&lt;/span&gt; &lt;span class="attr"&gt;msdata:IsDataSet&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt; &lt;span class="attr"&gt;msdata:UseCurrentLocale&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:complexType&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:choice&lt;/span&gt; &lt;span class="attr"&gt;minOccurs&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt; &lt;span class="attr"&gt;maxOccurs&lt;/span&gt;&lt;span class="kwrd"&gt;="unbounded"&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:element&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="Company"&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:complexType&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:sequence&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:element&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="Employee"&lt;/span&gt; &lt;span class="attr"&gt;nillable&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt; &lt;span class="attr"&gt;minOccurs&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt; &lt;span class="attr"&gt;maxOccurs&lt;/span&gt;&lt;span class="kwrd"&gt;="unbounded"&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:complexType&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:simpleContent&lt;/span&gt; &lt;span class="attr"&gt;msdata:ColumnName&lt;/span&gt;&lt;span class="kwrd"&gt;="Employee_Text"&lt;/span&gt; &lt;span class="attr"&gt;msdata:Ordinal&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:extension&lt;/span&gt; &lt;span class="attr"&gt;base&lt;/span&gt;&lt;span class="kwrd"&gt;="xs:string"&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:extension&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:simpleContent&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:complexType&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:element&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:sequence&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;&lt;/span&gt;&lt;span class="html"&gt;xs:attribute&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="ID"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="xs:string"&lt;/span&gt; &lt;span class="kwrd"&gt;/&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:complexType&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:element&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:choice&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:complexType&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:element&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;
&lt;br&gt;
&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="html"&gt;xs:schema&lt;/span&gt;&lt;span class="kwrd"&gt;&gt;&lt;/span&gt;&lt;pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl09" space="preserve"&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p class="MsoNormal"&gt;
Second, now that we have our Schema let's see the steps that we need to do in order
to validate against our schema (&lt;span id="intellitTxt"&gt;&lt;a class="pageTitle" id="#Page3"&gt;.NET
2.0):&lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p class="MsoListNumber"&gt;
1.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Read
the XML file content as Stream, TextReader or XmlReader.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
2.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Read
the Schema file content as Stream, TextReader or XmlReader.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
3.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Create
a new instance of XmlSchema object.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
4.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Set
XmlSchema object by calling XmlSchema.Read() method and passing the content of Schema
file 
&lt;br&gt;
and ValidationEventHandler method address to it.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
5.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Create
a new instance of XmlReaderSettings object.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
6.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Set
ValidationType for XmlReaderSettings object to Schema.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
7.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Add
your XmlSchema object to XmlReaderSettings Schemas collection by calling its Schemas.Add()
method.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
8.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Add
your ValidationEventHandler method address to XmlValidationReader's ValidationEventHandler
handler.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
9.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Create
a new instance of XmlReader object and pass your XML file content (as Stream or a
Reader object) 
&lt;br&gt;
and XmlReaderSettings object to it.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
10.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Call
Read() method of the Reader or Stream object to contain your XML file content in a
loop to parse 
&lt;br&gt;
and validate it completely.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
11.&lt;span style="font-family: "times new Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;Add
your logic to ValidationEventHandler method you created to implement what you want
to be done in 
&lt;br&gt;
the validation process.
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;p class="MsoListNumber"&gt;
Here is the code to accomplish this:
&lt;/p&gt;
&lt;pre&gt;&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;private&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;void&lt;/span&gt; ValidatingProcess(&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;string&lt;/span&gt; XSDPath, &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;string&lt;/span&gt; XMLPath)&lt;br&gt;
{&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;try&lt;/span&gt;
&lt;br&gt;
{&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
1- Read XML file content&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;this&lt;/span&gt;.Reader &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;new&lt;/span&gt; XmlTextReader(XMLPath);&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
2- Read Schema file content&lt;/span&gt;
&lt;br&gt;
StreamReader SR &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;new&lt;/span&gt; StreamReader(XSDPath); 
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
3- Create a new instance of XmlSchema object&lt;/span&gt;
&lt;br&gt;
XmlSchema Schema &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;new&lt;/span&gt; XmlSchema();&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
4- Set Schema object by calling XmlSchema.Read() method&lt;/span&gt;
&lt;br&gt;
Schema &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;=&lt;/span&gt; XmlSchema.Read(SR, 
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;new&lt;/span&gt; ValidationEventHandler(ReaderSettings_ValidationEventHandler)); 
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
5- Create a new instance of XmlReaderSettings object&lt;/span&gt;
&lt;br&gt;
XmlReaderSettings ReaderSettings &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;new&lt;/span&gt; XmlReaderSettings(); 
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
6- Set ValidationType for XmlReaderSettings object&lt;/span&gt;
&lt;br&gt;
ReaderSettings.ValidationType &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;=&lt;/span&gt; ValidationType.Schema; 
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
7- Add Schema to XmlReaderSettings Schemas collection&lt;/span&gt;
&lt;br&gt;
ReaderSettings.Schemas.Add(Schema); 
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
8- Add your ValidationEventHandler address to&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
XmlReaderSettings ValidationEventHandler&lt;/span&gt;
&lt;br&gt;
ReaderSettings.ValidationEventHandler += 
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;new&lt;/span&gt; ValidationEventHandler(ReaderSettings_ValidationEventHandler);&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
9- Create a new instance of XmlReader object&lt;/span&gt;
&lt;br&gt;
XmlReader objXmlReader &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;=&lt;/span&gt; XmlReader.Create(Reader,
ReaderSettings);&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
10- Read XML content in a loop&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;while&lt;/span&gt; (objXmlReader.Read())&lt;br&gt;
{ &lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;/*Empty
loop*/&lt;/span&gt;} 
&lt;br&gt;
&lt;br&gt;
}&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//try&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
Handle exceptions if you want&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;catch&lt;/span&gt; (UnauthorizedAccessException
AccessEx)&lt;br&gt;
{&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;throw&lt;/span&gt; AccessEx;&lt;br&gt;
}&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//catch&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;catch&lt;/span&gt; (Exception
Ex)&lt;br&gt;
{&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;throw&lt;/span&gt; Ex;&lt;br&gt;
}&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//catch&lt;/span&gt;
&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;private&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;void&lt;/span&gt; ReaderSettings_ValidationEventHandler(&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;object&lt;/span&gt; sender, 
&lt;br&gt;
ValidationEventArgs args)&lt;br&gt;
{&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;//
11- Implement your logic for each validation iteration&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;string&lt;/span&gt; strTemp;&lt;br&gt;
strTemp &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;"Line:
"&lt;/span&gt; &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;+&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;this&lt;/span&gt;.Reader.LineNumber &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;+&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;"
- Position: "&lt;/span&gt; 
&lt;br&gt;
&lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;+&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;this&lt;/span&gt;.Reader.LinePosition &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;+&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;"
- "&lt;/span&gt; &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;+&lt;/span&gt; args.Message; 
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px; font-weight: normal;"&gt;this&lt;/span&gt;.Results.Add(strTemp);&lt;br&gt;
}&lt;/span&gt;&lt;/pre&gt;
&lt;p class="MsoListNumber"&gt;
&lt;/p&gt;
&lt;/blockquote&gt; &lt;img width="0" height="0" src="http://www.spotgnome.com/aggbug.ashx?id=2c8c1df3-3cc2-4d9f-b185-3ff1f3bfe963" /&gt;</description>
      <comments>http://www.spotgnome.com/CommentView,guid,2c8c1df3-3cc2-4d9f-b185-3ff1f3bfe963.aspx</comments>
      <category>.Net</category>
      <category>C#</category>
      <category>Serialization</category>
      <category>Visual Studio</category>
      <category>XML</category>
      <category>XSD</category>
    </item>
    <item>
      <trackback:ping>http://www.spotgnome.com/Trackback.aspx?guid=50e8a794-d686-4331-b5fb-0ad7b0cb1319</trackback:ping>
      <pingback:server>http://www.spotgnome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.spotgnome.com/PermaLink,guid,50e8a794-d686-4331-b5fb-0ad7b0cb1319.aspx</pingback:target>
      <dc:creator>Guy Levin</dc:creator>
      <wfw:comment>http://www.spotgnome.com/CommentView,guid,50e8a794-d686-4331-b5fb-0ad7b0cb1319.aspx</wfw:comment>
      <wfw:commentRss>http://www.spotgnome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=50e8a794-d686-4331-b5fb-0ad7b0cb1319</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>First let's go over the basics:</strong>
        </p>
        <p>
By default, an XML element name is determined by the class or member name. In a simple
class named <code class="ce">Book</code>, a field named <code class="ce">Author</code> will
produce an XML element tag &lt;Author&gt;, as shown here:
</p>
        <p>
          <span style="COLOR: blue">public</span>
          <span style="COLOR: blue">class</span> Book<br />
{<br />
    <font color="#0000ff">public string</font> Author;<br />
}<br /></p>
        <p>
          <font color="#000000">When an instance of the Book </font>
          <font color="#000000">
            <font color="#000000">class </font>is</font> serialized,
it might produce this XML:<br />
....<br />
&lt;Author&gt;John Doe&lt;/Author&gt;<br />
....
</p>
        <p>
          <strong>Now, here are some of the elements we can use to control the serialization:</strong>
        </p>
        <p>
          <font size="2">
            <font color="#9acd32">
              <font color="#006400">
                <strong>[DefaultValueAttribute(0)]<br /></strong>
              </font>
            </font>
          </font>
          <font size="2">
            <font color="#000000">Can only be applied
to numeric members (int, float, double), when no value is given it will put the default
value 0. It is very important to remember that if the value of this member
will be 0 (or equals to the default value) this member will not be serialized!</font>
          </font>
        </p>
        <p>
          <span style="COLOR: blue">public</span>
          <span style="COLOR: blue">class</span> Book<br />
{<br />
    <font color="#0000ff">public string</font> Author;<br />
   <font size="1"><strong><font color="#006400">[DefaultValueAttribute(0)]</font></strong><br /></font>    <font color="#0000ff">public int</font> BookNum;<br />
}
</p>
        <p>
          <font color="#000000">In the XSD Schema it will do this:<br />
&lt;xs:element minOccurs="0" maxOccurs="1" default="0" name="<font color="#003300">BookNum</font>"
type="xs:int" /&gt;</font>
        </p>
        <p>
          <font color="#000000">
          </font> 
</p>
        <p>
          <font color="#006400">
            <strong>[XmlElement(ElementName = <span style="COLOR: maroon">"Book_Number"</span>)]<br /></strong>
          </font>With this attribute you can specify the element name instead of using
the member name.
</p>
        <p>
          <span style="COLOR: blue">public</span>
          <span style="COLOR: blue">class</span> Book<br />
{<br />
    <font color="#0000ff">public string</font> Author;<br /><strong><font color="#006400" size="1">      [DefaultValueAttribute(0)]<br />
      [XmlElement(ElementName = <span style="COLOR: maroon">"Book_Number"</span>)]</font></strong><br />
    <font color="#0000ff">public int</font> BookNum;<br />
}
</p>
        <p>
          <font color="#000000">In the XSD Schema it will do this:<br />
&lt;xs:element minOccurs="0" maxOccurs="1" default="0" name="</font>
          <font color="#003300">Book_Number</font>
          <font color="#000000">"
type="xs:int" /&gt;</font>
        </p>
        <font size="2">Will be continued in Part 2...</font>
        <br />
        <br />
        <!-- get your own widget at http://spotback.com -->
        <script src="http://spotback.com/scripts/widgets/load.js?wid=59">
        </script>
        <noscript>
          <a href="http://spotback.com" alt="Rate everything widget">
            <img src="http://spotback.com/images/rating.gif" alt="user rating" />
          </a>
        </noscript>
        <img width="0" height="0" src="http://www.spotgnome.com/aggbug.ashx?id=50e8a794-d686-4331-b5fb-0ad7b0cb1319" />
      </body>
      <title>XML Attributes That Controls Serialization - Part 1</title>
      <guid isPermaLink="false">http://www.spotgnome.com/PermaLink,guid,50e8a794-d686-4331-b5fb-0ad7b0cb1319.aspx</guid>
      <link>http://www.spotgnome.com/2007/11/28/XMLAttributesThatControlsSerializationPart1.aspx</link>
      <pubDate>Wed, 28 Nov 2007 07:30:33 GMT</pubDate>
      <description>&lt;p&gt;
&lt;strong&gt;First let's go over the basics:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
By default, an XML element name is determined by the class or member name. In a simple
class named &lt;code class=ce&gt;Book&lt;/code&gt;, a field named &lt;code class=ce&gt;Author&lt;/code&gt; will
produce an XML element tag &amp;lt;Author&amp;gt;, as shown here:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; Book&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#0000ff&gt;public string&lt;/font&gt; Author;&lt;br&gt;
}&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;When an instance of the Book &lt;/font&gt;&lt;font color=#000000&gt;&lt;font color=#000000&gt;class &lt;/font&gt;is&lt;/font&gt; serialized,
it might&amp;nbsp;produce this XML:&lt;br&gt;
....&lt;br&gt;
&amp;lt;Author&amp;gt;John Doe&amp;lt;/Author&amp;gt;&lt;br&gt;
....
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Now, here are some of the elements we can use to control the serialization:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;&lt;font color=#9acd32&gt;&lt;font color=#006400&gt;&lt;strong&gt;[DefaultValueAttribute(0)]&lt;br&gt;
&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;Can only be applied
to numeric members (int, float, double), when no value is given it will put the&amp;nbsp;default
value 0. It is very important to&amp;nbsp;remember&amp;nbsp;that if the value of this member
will be 0 (or equals to the default value) this member will not be serialized!&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; Book&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#0000ff&gt;public string&lt;/font&gt; Author;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font size=1&gt; &lt;strong&gt;&lt;font color=#006400&gt;[DefaultValueAttribute(0)]&lt;/font&gt;&lt;/strong&gt;
&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#0000ff&gt;public int&lt;/font&gt; BookNum;&lt;br&gt;
}
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;In the XSD Schema it will do this:&lt;br&gt;
&amp;lt;xs:element minOccurs="0" maxOccurs="1" default="0" name="&lt;font color=#003300&gt;BookNum&lt;/font&gt;"
type="xs:int" /&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#006400&gt;&lt;strong&gt;[XmlElement(ElementName = &lt;span style="COLOR: maroon"&gt;"Book_Number"&lt;/span&gt;)]&lt;br&gt;
&lt;/strong&gt;&lt;/font&gt;With this attribute you can specify the element name instead of using
the member name.
&lt;/p&gt;
&lt;p&gt;
&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; Book&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#0000ff&gt;public string&lt;/font&gt; Author;&lt;br&gt;
&lt;strong&gt;&lt;font color=#006400 size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DefaultValueAttribute(0)]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [XmlElement(ElementName = &lt;span style="COLOR: maroon"&gt;"Book_Number"&lt;/span&gt;)]&lt;/font&gt;&lt;/strong&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#0000ff&gt;public int&lt;/font&gt; BookNum;&lt;br&gt;
}
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;In the XSD Schema it will do this:&lt;br&gt;
&amp;lt;xs:element minOccurs="0" maxOccurs="1" default="0" name="&lt;/font&gt;&lt;font color=#003300&gt;Book_Number&lt;/font&gt;&lt;font color=#000000&gt;"
type="xs:int" /&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;font size=2&gt;Will be continued in Part 2...&lt;/font&gt; 
&lt;br&gt;
&lt;br&gt;
&lt;!-- get your own widget at http://spotback.com --&gt;
&lt;script src='http://spotback.com/scripts/widgets/load.js?wid=59'&gt;&lt;/script&gt;
&lt;noscript&gt;
&lt;a href="http://spotback.com" alt="Rate everything widget"&gt;&lt;img src="http://spotback.com/images/rating.gif" alt="user rating" /&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;img width="0" height="0" src="http://www.spotgnome.com/aggbug.ashx?id=50e8a794-d686-4331-b5fb-0ad7b0cb1319" /&gt;</description>
      <comments>http://www.spotgnome.com/CommentView,guid,50e8a794-d686-4331-b5fb-0ad7b0cb1319.aspx</comments>
      <category>Schema</category>
      <category>Serialization</category>
      <category>XML</category>
      <category>XSD</category>
    </item>
  </channel>
</rss>