Re: LoadXML trouble
| From: | Nathan Nobbe | Date: | Mon, 10 Dec 2007 16:56:33 +0000 |
| Subject: | Re: LoadXML trouble | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265612@lists.php.net to get a copy of this message | ||
On Dec 10, 2007 11:40 AM, Dani Castaños <danitao.mailists@gmail.com> wrote:
> I've checked $request previously and is not empty... it has something
> like:
>
> <?xml version="1.0"?>
> <response>
> <ticketID>1197026188_ec76</ticketID>
> <status>KO</status>
> <errCode>500</errCode>
> <errMsg>Internal Server Error</errMsg>
> </response>
>
have you been testing this in the context of your application, or have you
also
tried a focused test script? i would try something trivial, like:
<?php
$xml =
<<<XML
<?xml version="1.0"?>
<response>
<ticketID>1197026188_ec76</ticketID>
<status>KO</status>
<errCode>500</errCode>
<errMsg>Internal Server Error</errMsg>
</response>
XML;
$domDoc = new DOMDocument();
$domDoc->loadXML($xml);
echo $domDoc->saveXML() . PHP_EOL;
?>
just to ensure the DOM extension is available and working as expected.
-nathan