I'm new to XML and I was given two assignments recently involving XML and Schema. If I take out the schema the browser displays the XML but when I add the schema I get an error at the root element that says there is extra content at the end of the document. I looked through some answers on here and most of them have two root elements, or a space in the name of one of the element names, but that isn't issue.
I know it's something simple but I've been looking for a few hours and have really hit a wall with this.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com"
elementFormDefault="qualified">
<xsd:element name="table">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id" type="xsd:string"/>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="stars">
<xsd:simpletype>
<xsd:restriction base="xsd:positiveinteger">
<xsd:mininclusive value="0"/>
<xsd:maxinclusive value="5"/>
</xsd:restriction>
</xsd:simpletype>
</xsd:element>
<xsd:element name="facilities">
<xsd:simpletype>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Internet"/>
<xsd:enumeration value="Gym"/>
<xsd:enumeration value="Parking"/>
<xsd:enumeration value="Restaurant"/>
<xsd:enumeration value="Pick-up"/>
</xsd:restriction>
</xsd:simpletype>
</xsd:element>
<xsd:element name="address" type="xsd:string"/>
<xsd:element name="distancefromcenter" type="xsd:integer" minoccurs="0"/>
<xsd:element name="available" type="xsd:boolean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<table>
<hotel>
<id>1</id>
<name>Les Jardins du Marais</name>
<stars>3</stars>
<facilities>Internet</facilities>
<address>74 rue Amelot, Paris, 75011</address>
<distancefromcenter>2</distancefromcenter>
<available>True</available>
</hotel>
<hotel>
<id>2</id>
<name>Golden Tulip Little Palace</name>
<stars>4</stars>
<facilities>Internet Gym Parking Restaurant</facilities>
<address>4 rue Salomon De Caus, Paris, 75003</address>
<distancefromcenter>0.1</distancefromcenter>
<available>False</available>
</hotel>
<hotel>
<id>3</id>
<name>Tilsitt Etoile</name>
<stars>2</stars>
<facilities>Restaurant</facilities>
<address>23 rue Brey, Paris, 75017</address>
<distancefromcenter>3</distancefromcenter>
<available>False</available>
</hotel>
<hotel>
<id>4</id>
<name>Hotel Saint Charles</name>
<stars> 3</stars>
<facilities>Parking</facilities>
<address>6 rue de I'Esperance, Paris, 75013</address>
<distancefromcenter>1</distancefromcenter>
<available>True</available>
</hotel>
</table>