Subject:XQuery Replace Author:First Last Date:16 Sep 2005 03:08 PM
I'm trying to create an xQuery that will let me replace a node (or nodes) that may or may not exist in an xml document. The purpose being I just want to know that they are there (not what it's in it for now).
Subject:XQuery Replace Author:(Deleted User) Date:19 Sep 2005 03:51 AM
Hi Joel,
this simple query will work, assuming the structure of the input file is the one of your sample (i.e. "option" is the only node that can appear under "object"):
for $node in /stuff/object
return
<object id="{$node/@id}">
{
for $option in $node/option
return <option/>
}
</object>