[xsd-users] Problems Accessing Object

D. S. dsuhpublic at gmail.com
Thu Sep 18 17:21:46 EDT 2008


Boris,

Thank you for your help.
The only thing is the example you gave does not exactly work in my case.
I had to modify it to the following:

if (reqo.present ())
{
 MediaServerControl::request_type& r = reqo.get ();

 ...
}


On Thu, Sep 18, 2008 at 1:48 PM, Boris Kolpackov
<boris at codesynthesis.com> wrote:
> 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