RE: [bdbxml] Modifier query

"Antony Grinyer" <antony.grinyer-TjPRh57ScDpaa/[email protected]> Fri, 2 Sep 2005 16:45:48 +0100
Newsgroups gmane.comp.db.dbxml.general
Message-ID <989E1989F3130042879B902D175842162D04CC@msxmigration.cswgroup.local>
Aha! 

Ok John, so the expression itself may not be returning a node. I've
tested the XQuery expression I pass in, with the DB XML command  shell
and it appears to return the correct XML. The expression is:

collection('System.bdbxml')/containers/container[name='1']/paramsearchco
nfig

Which returns:

<paramsearchconfig>
  <context xpath="//chapter">chapter</context> 
  <context xpath="//publication">publication</context> 
  <context xpath="//section">section</context> 
</paramsearchconfig>

And I want to add a new context element.

Is there any rules that I must abide by as the above seems to be a
feasible expression that returns the XML content I want to update?

Thanks again,
Ant

> -----Original Message-----
> From: John Snelson [mailto:[email protected]] 
> Sent: 02 September 2005 04:39 pm
> To: Antony Grinyer
> Cc: [email protected]
> Subject: Re: [bdbxml] Modifier query
> 
> Hi Antony,
> 
> This error only occurs when you try to make a modification to 
> a value that isn't a node. However, this could be a value 
> selected by the expression you pass to the 
> XmlModify::addAppendStep() method, not just the value that 
> you pass into XmlModify::execute() - so maybe that is your problem?
> 
> John
> 
> Antony Grinyer wrote:
> > Hi,
> > 
> > I'm trying to do a simple modification query using the 
> 'addAppendStep'
> > method of the DB XML modifier API. I've used this 
> successfully in the 
> > past, however for a recent implementation, I keep getting 
> this error:
> > 
> > Error: XmlModify::execute: Cannot perform a modification on an 
> > XmlValue that isn't either Node or Document type, errcode = 
> > INVALID_VALUE, error code 0
> > 
> > Does anyone know what this means? The XmlValue which is 
> passed to the 
> > addAppendStep method is a simple well-formed document...I'm 
> not sure 
> > why this isn't working when it has worked before. The errcode = 
> > INVALID_VALUE suggests that XML passed into the addAppendStep is 
> > invalid, but I can't see how as it's a simple well formed 
> instance? Am 
> > I missing something here?
> > 
> > Any advice/help well very appreciated?
> > Thanks,
> > Ant
> > 
> > 
> > 
> > 
> > ------------------------------------------
> > To remove yourself from this list, send an email to 
> > [email protected]
> > 
> 
> 
> --
> John Snelson, Berkeley DB XML Engineer
> Sleepycat Software, Inc
> http://www.sleepycat.com
> 
> Contracted to Sleepycat through Parthenon Computing Ltd 
> http://blog.parthcomp.com/dbxml
> 
> 
> ------------------------------------------
> To remove yourself from this list, send an email to 
> [email protected]
> 
> 
> 
> 




------------------------------------------
To remove yourself from this list, send an
email to [email protected]