i'll just assume that you dont know how to do it, PHP DOM to the rescue....again.
ach! if i have to code one more php DOM script today i think i may go completely mad ,actually thats a lie, as its already happend EHHHEHEHHHHAHAHAHAHAAH
*clears throat*
anyway back to php for a moment if we may (how ever funny insanity may be)
PHP Code:
$pDomDoc = new DomDocument('1.0');
//create root node <imageCacheResult />
$root = $pDomDoc->appendChild($pDomDoc->createElement('imageCacheResult'));
//create <url /> node, then add a text node to it
$url = $root->appendChild($pDomDoc->createElement('url'));
$url->appendChild($pDomDoc->createTextNode('value of url'));
//create <thumbnail />, then append a text node to it
$thumb = $root->appendChild($pDomDoc->createElement('thumbnail');
$thumb->appendChild($pDomDoc->createTextNode('value of thumbnail'));
//save the xml
return $pDomDoc->saveXML();
that should work, hopefully and return this xml in a string:
xml Code:
<?xml version="1.0" ?>
<imageCacheResult>
<url>value of url</url>
<thumbnail>value of thumbnail</thumbnail>
</imageCacheResult>
if you need to specifiy a charset, just pass it into the second param in the DomDocument construct i.e.:
PHP Code:
$pDomDoc = new DomDocument('1.0', 'UTF-8');
hope that helps
Im off to continue my insanity now gooooooooooooooobyyyyyyyyyyyeeeeee