Hi,
I think we have discussed similar requirements on this list and the
conclusion was to support save() and load() methods using
javax.xml.transform.Source and javax.xml.transform.Result.
For example,
XMLHelper.load(Source source, Object option);
XMLHelper.save(Result result, Object option);
The Source can be StreamSource, DOMSource, SAXSource, StAXSource while the
Result can be StreamResult, DOMResult, SAXResult and StAXResult.
BTW, on the dev list, we are also discussing a databinding mediation
framework which can transform data from one format to the other.
Thanks,
Raymond
----- Original Message -----
From: "Ron Gavlin" <[EMAIL PROTECTED]>
To: "tuscany-user tuscany-user" <[email protected]>
Sent: Thursday, July 06, 2006 9:23 PM
Subject: SDOXMLResourceImpl.load(Node, Map) problems
Using EMF/SDO 1.0, we were able to use XMLResourceImpl's load and save
methods to transform between DataObjects and DOM Nodes. The same technique
is no longer working with Tuscany SDO 2.0. For example, when I invoke
SDOXMLResourceImpl.load(Node, null), a DynamicEObjectImpl is created
instead of a DataObjectImpl. Any ideas off the top of your head how to
make this work?
Of course, we would rather not resort to EMF APIs to efficiently convert
between DataObjects and DOM Nodes. But EMF APIs are better than paying the
performance penalty of using Strings or Input/Output Streams as an
intermediate representation. It would be nice if SDO or Tuscany provided
XMLHelper-like save/load methods that took DOM Nodes in addition to
Strings and Streams. Assuming we can get the SDOXMLResourceImpl load/save
problems mentioned above resolved, would it make sense to use EMF's
load/save capabilities to provide load/save services for DOM nodes? Would
SDOUtil, DataObjectUtil, a Tuscany DOMHelper, or another class be the
right location for such methods?
One of the reasons we need DOM Nodes from SDO DataObjects is so we can
perform XML Schema validation. Another reason we transform between
DataObjects and DOM Nodes is to interact with our web services engine.
Thanks in advance for your help.
- Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]