You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Jimmy Little <Ji...@mindspring.com> on 2002/01/03 20:11:12 UTC

RPCOperation: setDocument vs. insertDocument

Might just be a terminology thing but what is 'setDocument'?

Is this updating an existing document?  And if so, are the original
contents completely replace?

I have a need to append data to existing documents or create new ones
if the existing identifier does not exist.

Thanks,

Jimmy Little
(828) 835-8350
mailto:Jimmy-Little@mindspring.com
"The American Republic will endure, until politicians realize they
 can bribe the people with their own money."
 --Alexis De Tocqueville


Re: RPCOperation: setDocument vs. insertDocument

Posted by Tom Bradford <br...@dbxmlgroup.com>.
On Thursday, January 3, 2002, at 12:11 PM, Jimmy Little wrote:
> Might just be a terminology thing but what is 'setDocument'?
>
> Is this updating an existing document?  And if so, are the original
> contents completely replace?

The distinction between the two has to do with possibility of full 
transaction support in Xindice at some point.  Currently, their behavior 
is nearly identical, and yes the content is replaced.

> I have a need to append data to existing documents or create new ones
> if the existing identifier does not exist.

This isn't a problem that the APIs can solve for you.  A document can 
only have one root.  Appending to a document means that you have to 
retrieve at least the root element, and then add your content as a 
child, the APIs  won't generate a root for you.

--
Tom Bradford - http://www.tbradford.org
Developer - Apache Xindice (Native XML Database)
Creator - Project Labrador (XML Object Broker)