[xsd-users] DbXml update

Boris Kolpackov boris at codesynthesis.com
Fri Jul 18 08:53:01 EDT 2008


Hi Michael,

Michael Coulman <michael.coulman at mac.com> writes:

> 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()

Some time ago the DB XML folks have told me that they are considering
this.


> 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;
> 

I took a look at the API changes and it seem that updates to fragments
of a document are not possible with the new XmlEventWriter mechanism.
That is, you can read/write the whole document, you can also read a
fragment, but you cannot write a fragment. I've written to the DB XML
folks to find out if they have plans to support this in the near
future. Will let you know what they say.

Boris




More information about the xsd-users mailing list