[xsde-users] Using name spaces?

Boris Kolpackov boris at codesynthesis.com
Fri Aug 8 04:46:35 EDT 2008


Hi David,

Hardwick, David (GE Infra, Aviation) <David.Hardwick at ge.com> writes:

> When I use xsde to parse the following:
>  
> <?xml version="1.0"?>
> <q:caduRequest xmlns:q="http://www.example.com/example">
>   <element>TEST</element>
> </q:caduRequest>
>  
> I get the error: line 2: column 56: unexpected element encountered. 
>  
> Do I need to override something in order to use namespaces/prefixes? 

No, this should work out of the box. My guess would be you didn't 
pass the namespace argument to the document_pimpl c-tor. It should
be something along these lines:

xml_schema::document_pimpl doc_p (
  caduRequest_p,                          // root parser
  "http://www.example.com/example",       // root element namespace
  "caduRequest");                         // root element name

If this does not help, can you show your schema as well as the
code you use to parse the above XML document?

Boris



More information about the xsde-users mailing list