[xsd-users] CityGML deserialization - <cityObjectMember> tag

Adrian Victor Manoliu victor.manoliu at yahoo.com
Mon Aug 29 04:35:51 EDT 2011


Hello,

It works, thank you for your help !

Victor


________________________________
From: Pavel Pohanka <pavelpgt at gmail.com>
To: victor.manoliu at yahoo.com
Cc: xsd-users at codesynthesis.com
Sent: Monday, May 2, 2011 9:59 AM
Subject: Re: [xsd-users] CityGML deserialization - <cityObjectMember> tag


Hallo

Adrian Victor Manoliu <victor.manoliu at yahoo.com> writes:

> To sum up what I've written below (in case you don't  have the time to
> read everything), the CityGML serialization works, however one  tag is
> not generated properly - <cityObjectMember> is always replaced by
> <gml:featureMember>, perhaps a problem caused by substitution groups.

I had same problem some time ago and Boris explained it to me. The problem is really caused by substitution groups, because generated code looks for the first substituting element. You have to write the following code in order to include cityObjectMember:
citygml::CityModelType city_model;
gml::FeaturePropertyType city_object_member;
city_object_member._name ("cityObjectMember");
city_object_member._namespace ("http://www.opengis.net/citygml/1.0");

Then you can write whatever object you like:

city_object_member._Feature(some_type);
city_model.featureMember().push_back(city_object_member);

Ciao,

Pavel 


More information about the xsd-users mailing list