These example I got from one of the sites and I am trying to validate a xml file using the schema.
But I am getting the following errors. Please let me know where is the error. I am new to xml parsing...
E:\Imp_Exp\Testing>java TestParser personal-schema.xml Inside main method came inside the startDocument method ERROR: line 5: s4s-elt-invalid-content.1: The content of '#AnonType_personnel' i s invalid. Element 'element' is invalid, misplaced, or occurs too often. ERROR: line 11: s4s-elt-invalid-content.1: The content of '#AnonType_person' is invalid. Element 'element' is invalid, misplaced, or occurs too often. came inside the startElement method
a. you need to add xs:sequence after the complextype. b. simpletypes don't need base = 'xs:string' (they are always strings. c. enumeration elements should be in a restriction element. d. ...not sure what else I changed......check the diffs.