Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

LINQ to XSD

, 6 Nov 2008
How to use LINQ through XSD and XML
LinqToXSD_Demo.zip
LinqToXSD
Bin
LINQtoXSDWindowsApplication1.exe
Microsoft.Xml.Schema.Linq.dll
Sources
LINQtoXSDWindowsApplication1
Properties
Settings.settings
XML-XSD-Database
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="urn:books"
            xmlns:bks="urn:books">

  <xsd:element name="books" type="bks:BooksForm"/>

  <xsd:complexType name="BooksForm">
    <xsd:sequence>
      <xsd:element name="book" 
                  type="bks:BookForm" 
                  minOccurs="0" 
                  maxOccurs="unbounded"/>
      </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="BookForm">
    <xsd:sequence>
      <xsd:element name="author"   type="xsd:string"/>
      <xsd:element name="title"    type="xsd:string"/>
      <xsd:element name="genre"    type="xsd:string"/>
      <xsd:element name="price"    type="xsd:float" />
      <xsd:element name="pub_date" type="xsd:date" />
      <xsd:element name="review"   type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="id"   type="xsd:string"/>
  </xsd:complexType>
</xsd:schema>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Le Sourcier
Software Developer ECT Industries
France France
I am software engineer and I work for the aviation.
 
I'm currently working on many different project and in many different languages
- Visual C++ 6
- C#
- ASP.NET
- C and assembly
 
Have lot of fun

| Advertise | Privacy | Mobile
Web03 | 2.8.140821.2 | Last Updated 6 Nov 2008
Article Copyright 2008 by Le Sourcier
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid