Click here to Skip to main content
15,881,248 members
Articles / Programming Languages / XML

Parsing XSD Schema with SOM

Rate me:
Please Sign up or sign in to vote.
5.00/5 (9 votes)
13 Oct 2008CPOL 74.5K   1.3K   25  
Pull metadata from a schema or generate XML mappers
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xs:element name="HelloXSD">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="AnotherElement" type="xs:string" minOccurs="0" />
        <xs:element name="MyElement" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:attribute name="MyAttribute" type="xs:string" />
            <xs:attribute name="CreatedAttribute" type="xs:string" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="HelloXSD" />
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs: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)


Written By
Engineer Big Company
United States United States
My professional career began as a developer fixing bugs on Microsoft Word97 and I've been fixing bad habits ever since. Now I do R&D work writing v1 line of business applications mostly in C#/.Net.

I've been an avid pilot/instructor for 13+ years, I've built two airplanes and mostly fly gliders now for fun. I commute in an all-electric 1986 BMW 325 conversion.

I'd like to get back to my academic roots of programming 3D analysis applications to organize complex systems.

Comments and Discussions