[xsd-users] Inconsistency in Qname serialization/parsing

Boris Kolpackov boris at codesynthesis.com
Mon Dec 31 12:52:40 EST 2012


Hi Brice,

brice salva <salva.brice at gmail.com> writes:

> Yet, with xsd codesynthesis, I cannot customize the default namespace
> prefix when I use the *element-type* and *element-map* parse/serialize
> methods to exchange xml messages (no properties as parameter).

With element type/map you create the DOM document into which you
will be serializing yourself which means that you will need to
establish the namespace-prefix yourself as well. In your case,
this should be as simple as adding the "env:" prefix to the name
you pass as the second argument to createDocument() (see the
'messaging' example for a reference).

You can also add other mappings by simply adding DOM attributes.
Q 3.1, "How do I create an empty Xerces-C++ DOM document?" in the
C++/Tree FAQ shows how to do this:

http://wiki.codesynthesis.com/Tree/FAQ

Boris



More information about the xsd-users mailing list