It might be good enough for a quick and dirty utility at work, but I don't think it makes much sense to post it here.
Your code doesn't even begin to cover the XML spec, and you don't list any of its obvious limitations (no attributes allowed in replaced tags, no CDATA support...).
--
The XML Police
In reply to Re: XML element replacement
by mirod
in thread XML element replacement
by stevee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |