[xsd-users] Problems Accessing Object

Boris Kolpackov boris at codesynthesis.com
Thu Sep 18 16:48:01 EDT 2008


Hi,

D. S. <dsuhpublic at gmail.com> writes:

> I got the code to compile with your change, but the parser fails
> ("error : Unknown element 'MediaServerControl'" and many others) with
> an input xml file if I don't have
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="hello.xsd
> Is there a setting or change I can make to use just
> <MediaServerControl version="1.0"> ?

Yes, there are several methods to supply this information as discussed
in 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


> The thing is that XSD/e accepts the .xsd and .xml file as it is and
> parses and prints out the elements.

Mappings in XSD/e perform XML Schema validation in the generated code.
The C++/Tree mapping in XSD uses the underlying XML parser (Xerces-C++)
for XML Schema validation.

Boris




More information about the xsd-users mailing list