[xsd-users] ifc xml
giuseppe ferrari
giuseppe500 at yahoo.it
Fri Jan 28 06:04:36 EST 2011
________________________________
Da: giuseppe ferrari <giuseppe500 at yahoo.it>
A: Boris Kolpackov <boris at codesynthesis.com>
Inviato: Ven 28 gennaio 2011, 12:03:31
Oggetto: Re: [xsd-users] ifc xml
thanks boris.
and for serialize a document after read it?
I tryed with this code :
auto_ptr<ex::iso_10303_28> h (ex::iso_10303_28_("c:\\esempioifcxml.xml" ));
xml_schema::namespace_infomap map;
std::ofstream ofs ("c:\\test.xml");
::ex::iso_10303_28_(ofs, *h , map, "UTF-8");
but i get:
Unhandled exception at 0x00cf2aa6 in ifctest.exe: 0xC0000005: Access violation
reading location 0x00000014.
size_type size() const
{ // return length of sequence
return (_Mysize);
}
in xstring file.
may be that are the nillable type?
and i see that when i parsing the xml in the output console of vs 2003 appear
this exeception:
First-chance exception at 0x7c812afb (kernel32.dll) in ifctest.exe: Microsoft
C++ exception: xercesc_3_1::TraverseSchema::ExceptionCodes @ 0x0013e210.
but all work fine
this is really all.
thanks again.
________________________________
Da: Boris Kolpackov <boris at codesynthesis.com>
A: giuseppe ferrari <giuseppe500 at yahoo.it>
Cc: xsd-users at codesynthesis.com
Inviato: Ven 28 gennaio 2011, 11:23:12
Oggetto: Re: [xsd-users] ifc xml
Hi Giuseppe,
giuseppe ferrari <giuseppe500 at yahoo.it> writes:
> I have to do with many ifcxml, maybe you can dynamically add through xerces
> engine using namespace xmlns: = ifc
> "http://www.iai-tech.org/ifcXML/IFC2x3/FINAL" when there aren't?
Yes, you can do this using the DOMLSParser::parseWithContext() function.
Basically, you will need to do the following:
2. Set up your own XML-to-DOM parsing (see the 'multiroot' example for
more information on how to do this).
3. Create an empty DOM document with the ifc prefix set.
4. Use the parseWithContext() function to parse your XML in the context
of the document created on step 2.
4. Then, instead of calling the parsing function, construct the root
element type directly:
DOMElement* e = ... // iso_10303_28 element
auto_ptr<ex::iso_10303_28> r (new ex::iso_10303_28 (*e));
Boris
More information about the xsd-users
mailing list