XSD Error: Character content is not allowed, because the content type is empty

It's saying that the "Person" cannot include a string. For the xml to validate with that xsd use this :

<?xml version="1.0" ?>
<People>
    <Person name='john'>
    </Person>
    <Person name='sarah'>
    </Person>
    <Person name='chris'>
   </Person>
</People>

Try this for the xsd for validation :

<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <xsd:element name="People">
      <xsd:complexType>
         <xsd:sequence>
         <xsd:element name="Person" type="Person" maxOccurs="unbounded"/>
         </xsd:sequence>
      </xsd:complexType>
   </xsd:element>

   <xsd:complexType name="Person">
     <xsd:simpleContent>
        <xsd:extension base="xsd:string">
           <xsd:attribute name="name" type="xsd:string" use="required" />
        </xsd:extension>
    </xsd:simpleContent>
   </xsd:complexType>
</xsd:schema>

Tags:

Xml

Xsd