[xsd-users] Problem with a GML parsing
Boris Kolpackov
boris at codesynthesis.com
Wed Apr 22 06:23:46 EDT 2009
Hi Rubén,
Rubén Martínez <dante.aureon at gmail.com> writes:
> I have a problem with a parser GML files, a small gml file with CityGML
> code.
It is a good idea to show us the file (no need to send the schema; it is
publicly available).
> I need to parser a file in a Object, mi app. compile an execute correctly,
> but my object that I need is empty!
I assume you compiled all your schemas with the --generate-polymorphic
option.
> core::CityModelType::_GenericApplicationPropertyOfCityModel_sequence
> seqCity = r->_GenericApplicationPropertyOfCityModel();
Use a reference instead of making a copy:
core::CityModelType::_GenericApplicationPropertyOfCityModel_sequence&
seqCity = r->_GenericApplicationPropertyOfCityModel();
> if ( gml::FeaturePropertyType* fpt =
> dynamic_cast<gml::FeaturePropertyType*> (&(*iterator_begin)))
> {
> // FeaturePropertyType fpt.
> }else {
> // No es.
> } <<<------------------- This code non execute
Which branch is executing? It is also hard to say which one should
without seeing the XML file.
Boris
More information about the xsd-users
mailing list