On Sun, 02 Dec 2001 18:48:27 +0000
Michael Hearn <[EMAIL PROTECTED]> wrote:

> Hiya there, I apologise in advance if this is not the place to post 
> technical queries by the way, but this seemed the best place on the site 
> so here goes:
> 
> I have a question about how to use XUpdate that has not been addressed 
> by reading and rereading the working draft, could you please answer it 
> for me?
> 
> I was wondering - how do I change an attribute on an element? I've tried 
> (root element not included):
> 
> <xupdate:update select="/user/profile/dob">
>   <xupdate:attribute name="year">1979</xupdate:attribute>
> </xupdate:update>
> 
> but I got a compilation error (using dbXML)
> 
> where the element at /user/profile/dob is
> 
> <dob month="April" day="17" year="1984"/>

Select the Attribute node you want to update and use the new content
as the Text node of the <update> element. Elements like <attribute>
are used for <insert> and <append> operations, but not for updates.
Regards, Lars.
--
______________________________________________________________________
Lars Martin                             mailto:[EMAIL PROTECTED]
SMB GmbH                                        http://www.smb-tec.com

----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact administrator:  mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------

Reply via email to