Having trouble getting my XML schema to work with my xml file.

The layout of the xml file is:

<catalogue>
    <nextID>02</nextID>
        <letters>
            <letter>
                <title> </title>
                <sender> </sender>
                <recipient> </recipient>
                <text> </text>
            </letter>
        </letters>
</catalogue>

the xml schema layout I have is:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
 elementFormDefault="qualified">

 <xs:element name="catalogue">
  <xs:complexType>
    <xs:sequence>
        <xs:element name ="nextID">
        </xs:element>
        <xs:element name="letters">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="letter">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element name ="title" type="xs:string"/>
                                <xs:element name ="sender" type="xs:string"/>
                                <xs:element name="recipient" type ="xs:string"/>
                                <xs:element name ="text" type="xs:string"/>
                            </xs:sequence>
                                <xs:attribute name="id" type="xs:integer" use="required"/>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:sequence>
   </xs:complexType>
</xs:element>
</xs:schema>

Any solutions?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.