Subject:node search and replace Author:First Last Date:03 Feb 2006 12:24 AM
I'm trying to create an xquery that can search and replace a node based on it's tagname. It'd be nice if the xquery or function(s) would be generic enough such that if the structure changes I don't have to modify the code. I've tried various for loops and functions but keep hitting a wall. Thanx in advance for any help.
Subject:node search and replace Author:(Deleted User) Date:03 Feb 2006 10:30 AM
Hi, Joel.
You can do this by defining a function using the standard XQuery grammar. This function (attached) recursively navigates a given tree and determines whether or not the element names it finds need to be renamed.
Subject:node search and replace Author:First Last Date:04 Feb 2006 12:08 PM
Thanx. That helps a lot.
However, I guess I didn't explain totally what I was looking for (your response though answered my question as written). I'll try and see if I can tweak the function further myself, maybe learn a few more things along the way. If not, I'll be back =)