I am having trouble getting my files to validate.
Here are the errors that I am getting.
4: 14 cvc-complex-type.2.4.a: Invalid content was found starting with element 'AirportList'. One of '{"":Airport}' is expected.
47: 15 XML document structures must start and end within the same entity.
I will post both my xml document code and my xsd schema below. I'm new to this, so I'm not sure what I'm doing wrong. I have changed the formatting of my files around but I still get the same errors. Thank you.
<?xml version="1.0"?> <AirportList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="simple_apoole33.xsd"> <AirportList> <Airport> <name>Abbotsford International Airport</name> <community>Abbotsford</community> <province>British Columbia</province> <passengers>15</passengers> </Airport> <Airport> <name>Atlin Airport</name> <community>Atlin</community> <province>British Columbia</province> <passengers>15</passengers> </Airport> <Airport> <name>Atlin Water Aerodrome</name> <community>Atlin</community> <province>British Columbia</province> <passengers>15</passengers> </Airport> <Airport> <name>Baie-Comeau Water Aerodrome</name> <community>Baie-Comeau</community> <province>Quebec</province> <passengers>15</passengers> </Airport> <Airport> <name>Beaver Creek Airport</name> <community>Beaver Creek</community> <province>Yukon</province> <passengers>15</passengers> </Airport> <Airport> <name>Bedwell Harbour Water Aerodrome</name> <community>Bedwell Harbour</community> <province>British Columbia</province> <passengers>15</passengers> </Airport> <Airport> <name>Billy Bishop Toronto City Airport</name> <community>Toronto</community> <province>Ontario</province> <passengers>15</passengers> </Airport> </AirportList> <?xml version="1.0"?> <!-- XSD Schema for simple_apoole33_IT_MUST_VALIDATE.xml --> <xsd:schema xmlns:xsd= "http://www.w3.org/2001/XMLSchema"> <xsd:element name="AirportList"> <xsd:complexType> <xsd:sequence> <xsd:element name="Airport" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <xsd:element name="name"type="xsd:string"/> <xsd:element name="community"type="xsd:string"/> <xsd:element name="province"type="xsd:string"/> <xsd:element name="passengers"type="xsd:integer" minOccurs = "0"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
No comments:
Post a Comment