I finally got my XML post to work!
But is seems the response I am getting back is not pure XML, it is wrapped in HTML.
And I suspect that is why I'm having trouble parsing it?
I think the response looks like this:
Code: Select all
<html>
<br/>HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=7EC4F5A2125F2C100CE7D47779DF07A0; Path=/vapp
Content-Type: text/html;charset=ISO-8859-1
Transfer-Encoding: chunked
Date: Sun, 26 Apr 2009 12:25:45 GMT
1ed
<?xml version="1.0" encoding="UTF-8"?><[color=#FF0000]the XML is here...[/color]>
0
<br/>
</body>
</html>
I am trying to parse it like this:
Code: Select all
$resultXML = simplexml_load_string($result);
parser error : Start tag expected, '<' not found in .....
I also tried this:
Code: Select all
$xmlResponse = "";
$xml_parser = xml_parser_create();
xml_parse_into_struct($xml_parser, $xmlResponse, $vals, $index);
var_dump($xmlResponse);
string(0) ""
Any help will be MUCH appreciated!
ps.
I am trying to avoid using curl since I dont have it installed and dont know if it is installed on the live server.