[xsd-users] DbXml update

Michael Coulman michael.coulman at mac.com
Thu Jul 17 16:32:39 EDT 2008


Здравствуйте Борис,

I use DbXml as a persistent backend for XML instance documents modeled  
by XSD. The DbXml upgrade from 2.3.x to 2.4.x (including update from  
Xerces-2.7 to 2.8) removes DOM access.

Removed all C++ interfaces that used Xerces-C DOM, including:
	• XmlDocument::setContentAsDOM()
	• XmlDocument::getContentAsDOM()
	• XmlValue::asNode()

This, in turn, breaks the dbxml/driver.cxx example code:

g++ -I../../../../libxsd -DDBXML_DOM -I/opt/local/include -W -Wall -c  
driver.cxx -o driver.o
driver.cxx: In function ‘int main()’:
driver.cxx:83: error: ‘class DbXml::XmlDocument’ has no member  
named ‘getContentAsDOM’
driver.cxx:117: error: ‘class DbXml::XmlDocument’ has no member  
named ‘getContentAsDOM’
driver.cxx:140: error: ‘class DbXml::XmlValue’ has no member named  
‘asNode’
driver.cxx:156: error: ‘class DbXml::XmlValue’ has no member named  
‘asNode’
make: *** [driver.o] Error 1

DbXml provides one work around for getContentAsDOM in their  
xercesDomTranslator example code.

Similar logic might be used to replace the XSD dbxml/driver.cxx idiom

         // Create an object model from the document fragment.
         //
         auto_ptr<book> b (
           new book (
             *static_cast<xercesc::DOMElement*> (v.asNode ())));

by returning a *DOMNode from a method in xercesDomTranslator.

I'm stuck on what to do with the XSD dbxml/driver.cxx idiom

         // Update the document fragment from the object model.
         //
         *static_cast<xercesc::DOMElement*> (v.asNode ()) << *b;

Anyone else facing this issue that would like to share a clue with me?

TIA,
--
Michael Coulman
michael.coulman at mac.com








More information about the xsd-users mailing list