[xsd-users] ifc xml

giuseppe ferrari giuseppe500 at yahoo.it
Mon Jan 24 10:20:15 EST 2011


hy Boris.
Thanks for your help , i'm sorry but i can't deserialize the entities and i 
can't find your book in the store (i'm italian and the english book are rare) :

// test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <memory>
#include "../ex.hxx"
#include "../iso_10303_28_header.hxx"
#include "../Entity.hxx"
#include "../uos1.hxx"
#include "../uos.hxx"
#include <iostream>
#include <fstream>
using namespace std;
using namespace xercesc;


int main(int argc, char* argv[])
{
    try
    {
   
        auto_ptr<ex::iso_10303_28> h 
(ex::iso_10303_28_("c:\\esempioifcxml.xml",xml_schema::flags::dont_validate));
           
        ex::uos& ex_uos (h->uos ());

        if (ifc::uos* uos = dynamic_cast<ifc::uos*> (&ex_uos))
        {
            assert("ok");
       
        }           
    }
    catch (const xml_schema::exception& e)
    {
       
        cerr << e << endl;
       
        ofstream myfile;
        myfile.open ("c:\\error2.txt");
        myfile << "\n" << e << "\n";
        myfile.close();

        char ch;
        cin >> ch;
        return 1;
    }
}

 if (ifc::uos* uos = dynamic_cast<ifc::uos*> (&ex_uos))
return always false!
&ex_uos is filled , but withowt entities.
the rtti is active.

In the deserialized files i can see a uos1 class, but i can't understand what do 
with it.

IS possible that i do a mistake in the creations of c++ files with xsd?
i See that there is an xml configuration file in the zip downloaded from ifc 
site.
may be the problem.

I'm a little frustrated.
thanks in advance.



      


More information about the xsd-users mailing list