[xsd-users] ifc xml

Boris Kolpackov boris at codesynthesis.com
Fri Jan 28 05:23:12 EST 2011


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