[xsd-users] Failing to parse XML document generated with the same code.

Boris Kolpackov boris at codesynthesis.com
Fri Sep 18 15:54:16 EDT 2009


Hi Juan,

Juan Pablo Perez <juanpablo.perez at gmail.com> writes:

> And when I run the code I get the following errors:
> 
> xml1.xml:2:93 error: Unknown element 'msg'

I created a test case based on your schema and code. It works fine
if I keep xml1.xsd in the same directory as xml1.xml. If I move
this file somewhere else, I get the same errors you do. I also got
the following warning before all the errors:

warning: unable to open primary document entity 'xml1.xsd'

Do you get the warning as well? If you do, then the problem is that
the parser cannot find the schema to validate the XML document. For
various ways to resolve this see Section 5.1, "XML Schema Validation
and Searching" in the C++/Tree Mapping Getting Started Guide:

http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#5.1

Boris




More information about the xsd-users mailing list