Hi,

Should we allow the XMLStreamReader to be at START_DOCUMENT position for the following method? In this case, the root DataObject will be returned.

/**
* Create a DataObject from an element in a XML stream.
* The reader must be positioned on a START_ELEMENT event.
*
* @param reader the stream to read
* @return a DataObject created from the element in the stream
* @throws XMLStreamException if there was a problem reading the stream
* @throws IllegalStateException if the reader is not positioned on a START_ELEMENT event
*/
public DataObject loadObject(XMLStreamReader reader) throws XMLStreamException, IllegalStateException;

Thanks,
Raymond

----- Original Message ----- From: "Jeremy Boynes" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, March 30, 2006 9:26 AM
Subject: API for adding StAX support to SDO


Frank and I had a quick dicussion offline about adding a helper API to
SDO to support loading/saving DataObjects from/to StAX streams. I've
checked a strawman of an API for this so we can all discuss.

https://svn.apache.org/repos/asf/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/XMLStreamHelper.java

I separated this into its own file so that people not using StAX will
not need to add the API jar to their classpath.

--
Jeremy

Reply via email to