If you use xindice 1.0, you'd try it with xindice 1.1!
trying toFrom: "R. Mark Volkmann" <[EMAIL PROTECTED]> Reply-To: xindice-users@xml.apache.org To: xindice-users@xml.apache.org Subject: XUpdate to add a document to a collection Date: Tue, 4 Jan 2005 10:47:11 -0600
I need to add a document to a collection from a Java application. I'm
method.do this using the XUpdate API. Is this the best way?
Here is the xupdate string I'm passing to my XUpdateQueryService update
Error
<xu:modifications version="1.0" xmlns:xu="http://www.xmldb.org/xupdate"> <xu:insert-after select="/services/service[1]"> <xu:element name="service"> <xu:attribute name="name">foo</xu:attribute> <description>bar</description> </xu:element> </xu:insert-after> </xu:modifications>
It fails with the following stack trace.
org.xmldb.api.base.XMLDBException: org.apache.xmlrpc.XmlRpcException:
Compiling XPath Expression: null at org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(CollectionImpl.java:119)
at org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.query(CollectionImpl.java:515)
at org.apache.xindice.client.xmldb.XindiceCollection.query(XindiceCollection.java:259)
at org.apache.xindice.client.xmldb.services.QueryService.query(QueryService.java:90)
at org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUpdateQueryServiceImpl.java:81)
Any suggestions would be greatly appreciated!
-- R. Mark Volkmann Partner, Object Computing, Inc.
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com