A couple of issues: The xerces-dev list is dead, use the xerces-j-dev (or xerces-c-dev for C++ related questions) list instead.
The XML declaration must be the very first thing in the file (not even line feeds or white space) before it. It would appear that you have the XML declaration (<?xml...?>) on the second line. You did not declare a namespace in your schema file, <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/1999/XMLSchema"> <element name="Top" > <element name="Telephone" type="string" /> </element> </schema> If you are just trying to learn about schema validation, I would recommend that you download XSV from http://www.w3.org/XML/Schema since it supports the 2 Nov Candidate Recommendation and substantially more features than Xerces-J currently does. In that case, the following files will work: <?xml version="1.0" encoding="UTF-8"?> <Top xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:noNamespaceSchemaLocation='simp.xsd' > <Telephone> 9725074850 </Telephone> </Top> ---------- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200010//EN" "http://www.w3.org/2000/10/XMLSchema.xsd"> <schema xmlns="http://www.w3.org/2000/10/XMLSchema"> <element name="Top" > <complexType> <sequence> <element name="Telephone" type="string" /> </sequence> </complexType> </element> </schema>