| mknabster |
09-02-2012 10:02 PM |
Validation and Well-formed errors?
I have an assignment for school where we are given a schema, and we have the write the XML instance file for. Now i was able to write the code just fine, but when i ran the schema and instance through XML Schema Validator like instructed, i receive these 2 errors:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'PhaseA_Instance_File_Matthew_Knab'. One of '{client}' is expected. at 5,36
XML document structures must start and end within the same entity. at 82,37
Here's my code:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<client_information xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Access Data_Client Projects_Schema.xsd">
<?xml-stylesheet type="text/css" href="Access Data_Phase A_Test Program.css"?>
<PhaseA_Instance_File_Matthew_Knab>
<Client>
<Client_ID>1</Client_ID>
<Client_Name>John Hill</Client_Name>
<Client_Address_Street_1>123 Broad Street</Client_Address_Street_1>
<Client_Address_Street_2>Apartment 2</Client_Address_Street_2>
<Client_Address_City>State College</Client_Address_City>
<Client_Address_State>PA</Client_Address_State>
<Client_Address_Zip>16801</Client_Address_Zip>
<Client_Phone_Number>614222333</Client_Phone_Number>
<Client_Fax_Number>6143234444</Client_Fax_Number>
<Client_Email>jhill@ist.psu.edu</Client_Email>
<Project_Number>22</Project_Number>
<Contact_Person_Name>Patrick Lunney</Contact_Person_Name>
<Contact_Person_Phone>5554443333</Contact_Person_Phone>
<Contact_Person_Fax>6667778888</Contact_Person_Fax>
<Contact_Person_Email>pat@email.com</Contact_Person_Email>
<Delivery_Preference>Phone</Delivery_Preference>
</Client>
<Client>
<Client_ID>2</Client_ID>
<Client_Name>Matthew Knab</Client_Name>
<Client_Address_Street_1>501 Vairo Blvd</Client_Address_Street_1>
<Client_Address_Street_2>Apartment 1533</Client_Address_Street_2>
<Client_Address_City>State College</Client_Address_City>
<Client_Address_State>PA</Client_Address_State>
<Client_Address_Zip>16803</Client_Address_Zip>
<Client_Phone_Number>6102839642</Client_Phone_Number>
<Client_Fax_Number>8145553679</Client_Fax_Number>
<Client_Email>mknabster@verizon.net</Client_Email>
<Project_Number>22</Project_Number>
<Contact_Person_Name>Kelly Unce</Contact_Person_Name>
<Contact_Person_Phone>8145559720</Contact_Person_Phone>
<Contact_Person_Fax>8145556310</Contact_Person_Fax>
<Contact_Person_Email>kunce@email.com</Contact_Person_Email>
<Delivery_Preference>Email</Delivery_Preference>
</Client>
<Client>
<Client_ID>3</Client_ID>
<Client_Name>Mary Scoob</Client_Name>
<Client_Address_Street_1>Park Avenue Plaza</Client_Address_Street_1>
<Client_Address_Street_2>55 East 52nd Street</Client_Address_Street_2>
<Client_Address_City>New York</Client_Address_City>
<Client_Address_State>NY</Client_Address_State>
<Client_Address_Zip>10055</Client_Address_Zip>
<Client_Phone_Number>2128105300</Client_Phone_Number>
<Client_Fax_Number>2127543123</Client_Fax_Number>
<Client_Email>mscoob@email.com</Client_Email>
<Project_Number>18</Project_Number>
<Contact_Person_Name>Giovanni Guido</Contact_Person_Name>
<Contact_Person_Phone>2125558490</Contact_Person_Phone>
<Contact_Person_Fax>2125556798</Contact_Person_Fax>
<Contact_Person_Email>gguido@email.com</Contact_Person_Email>
<Delivery_Preference>Phone</Delivery_Preference>
</Client>
<Client>
<Client_ID>4</Client_ID>
<Client_Name>Jennifer Smierkiey</Client_Name>
<Client_Address_Street_1>Park Avenue Plaza</Client_Address_Street_1>
<Client_Address_Street_2>55 East 52nd Street</Client_Address_Street_2>
<Client_Address_City>New York</Client_Address_City>
<Client_Address_State>NY</Client_Address_State>
<Client_Address_Zip>10055</Client_Address_Zip>
<Client_Phone_Number>2128105300</Client_Phone_Number>
<Client_Fax_Number>2127543123</Client_Fax_Number>
<Client_Email>jennsmierk@email.com</Client_Email>
<Project_Number>18</Project_Number>
<Contact_Person_Name>Giovanni Guido</Contact_Person_Name>
<Contact_Person_Phone>2125558490</Contact_Person_Phone>
<Contact_Person_Fax>2125556798</Contact_Person_Fax>
<Contact_Person_Email> gguido@email.com</Contact_Person_Email>
<Delivery_Preference>Phone</Delivery_Preference>
</Client>
</PhaseA_Instance_File_Matthew_Knab>
If anyone could help me understand what's wrong with my code here, i would appreciate it. Thanks for your time
|