XSD file with multiple namespaces

I have been trying to import SharePoint XML data into database and I cannot seem to figure out the proper XSD file. The generators don’t seem to do it correctly. The namespaces seem to mess up the results.

A sample of the XML file (note that this format cannot be changed):

<rs:data xmlns:rs="http://www.w3.org/2001/XMLSchema">
    <z:row ID="1" ProductName="Widget" xmlns:z="#RowsetSchema"/>
    <z:row ID="2" ProductName="Widget" xmlns:z="#RowsetSchema"/>

XSD (one attempt):

<?xml version="1.0"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"

  <xs:element name="data">
        <xs:element minOccurs="1" maxOccurs="unbounded" name="row">
            <xs:attribute name="ID" type="xs:unsignedByte" use="required" />
            <xs:attribute name="ProductName" type="xs:string" use="required" />

Source: xml

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.