> Hi Joseph.
>
> Sorry it took so long to reply, I moved house this last month, my PDA died,
> my desktop died, and my hard drive was dying, so I'm still finding my
> feet...
>
> Sorry, no there is no easy way to do this. The exportAsXml() wants a node,
> and returns both start and end tags. A regular expression should do the
> trick though, something like:
>
> $XmlResult2 = preg_replace("/^[^>]*>(.*)<[^<]*$/", "\\1", $XmlResult);
No, I am not dead, just damn busy. Anyway, I had to interject. It
would be must better to use a backreference here in the regexp.
$XmlResult2 = preg_replace('/<(mytag).*?>(.*?)<\/\1>/', '\2', $XmlResult);
Dan
--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Daniel Allen, <da...@mo...>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chaos reigns within.
Reflect, repent, and reboot. Order shall return.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|