[xsde-users] Re: How to remove the g1: string from the generated xml doc

Constantin Iacobescu sir.costy at gmail.com
Thu Jun 11 12:49:36 EDT 2009


Helo,

I has the same problem and here is my solution

infoMap[""].name    = "http://www.landxml.org/schema/LandXML-1.2";

and optional but a good thing is to put also

infoMap[""].schema = "
http://www.landxml.org/schema/LandXML-1.2/LandXML-1.2.xsd";


so on you it should be

infoMap[""].name    = "urn:ietf:params:xml:ns:dialog-info";

and then use the infoMap as parameter to serialization function

hope to help the answer,
Costy





On Thu, Jun 11, 2009 at 8:20 PM, Boris Kolpackov <boris at codesynthesis.com>wrote:

> Hi Jerry,
>
> Jerry Yin <jerry.yin at yahoo.com> writes:
>
> > The serializer appended the g1: token in the generated XML doc. How
> > to remove it. Here are the original XML doc and the serialized doc.
> >
> > Original XML:
> >
> > <?xml version="1.0"?>
> > <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
> >
> > [...]
> >
> > Serialized XML:
> >
> > <g1:dialog-info xmlns:g1="urn:ietf:params:xml:ns:dialog-info"
>
> You can get the same output as the original XML by specifying
> the custom namespace-prefix mapping:
>
> doc_s.add_default_prefix ("urn:ietf:params:xml:ns:dialog-info");
>
> See Chapter 8, "Document Serializer and Error Handling" in the
> Embedded C++/Serializer Mapping Getting Started Guide for more
> information:
>
>
> http://www.codesynthesis.com/projects/xsde/documentation/cxx/serializer/guide/index.xhtml#8
>
> Boris
>
>


More information about the xsde-users mailing list