Parse XML data from PHP SOAP ResponseDeleting an element from an array in PHPUsing SOAP to access webservices - failing on soapclient()How do you parse and process HTML/XML in PHP?webservices using nusoapHow to drill into SOAP Namespaces with SimpleXML & PHPRead SOAP XML by ASMX web servcie functionC#+Magento API V2:The content type text/xml; charset=utf-8,text/xml; charset=UTF-8 of the response message does not matchSOAP response/Request then how to convert it in to PHPError using node-soap in NodeJSNuSOAP Service Response on Localhost
How do I learn to recognise what is worth publishing
Could the rotation of a black hole cause other planets to rotate?
What does "2 HD of creatures" for the spell Banishment mean?
Introducing Tetronogram!
What is this 4 sharp symbol and what does it mean?
How should Scrum and Kanban teams track Continuous Improvement activities?
Why did House of Representatives need to condemn Trumps Tweets?
How to include a table in the footnote environment
What do you call a flexible diving platform?
Is it error of law to judge on less relevant case law when there is much more relevant one?
Why is the Apollo LEM ladder so far from the ground?
Why not notify faculty candidates of the position being filled?
How can religions be structured in ways that allow inter-faith councils to work?
Are fretless stringed instruments used mainly for melody?
What language is Raven using for her attack in the new 52?
Polyhedra, Polyhedron, Polytopes and Polygon
How did the SysRq key get onto modern keyboards if it's rarely used?
Can I change the license of a forked project to the MIT if the license of the parent project has changed from the GPL to the MIT?
Comparisons of a general truth
Copying an existing HTML page and use it, is that against any copyright law?
Why is it considered acid rain with pH <5.6?
How many oliphaunts died in all of the Lord of the Rings battles?
How can I kill my goat?
Why do planes need a roll motion?
Parse XML data from PHP SOAP Response
Deleting an element from an array in PHPUsing SOAP to access webservices - failing on soapclient()How do you parse and process HTML/XML in PHP?webservices using nusoapHow to drill into SOAP Namespaces with SimpleXML & PHPRead SOAP XML by ASMX web servcie functionC#+Magento API V2:The content type text/xml; charset=utf-8,text/xml; charset=UTF-8 of the response message does not matchSOAP response/Request then how to convert it in to PHPError using node-soap in NodeJSNuSOAP Service Response on Localhost
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have successfully been able to get a response from an API im working with, with the help of Brian Driscoll but am having trouble parsing that XML data. Here is the script to get the response and the returned XML data -
$clientC = new SoapClient('http://webservice.nada.com/vehicles/vehicle.asmx?wsdl',array('trace' => 1,'exceptions' => 1, 'cache_wsdl' => 0));
$params = new stdClass();
$params->Token = $token;
$params->Period = 1;
$params->VehicleType = "UsedCar";
$params->Vin = '5YFBURHE3FP331896';
$params->Region = 10;
$params->Mileage = 100;
$result = $clientC->getDefaultVehicleAndValueByVin(array('vehicleRequest' => $params));
$xml = htmlspecialchars($clientC->__getLastResponse());
This returns -
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getDefaultVehicleAndValueByVinResponse xmlns="http://webservice.nada.com/">
<getDefaultVehicleAndValueByVinResult>
<Uid>1182699</Uid>
<VehicleYear>2015</VehicleYear>
<MakeCode>47</MakeCode>
</getDefaultVehicleAndValueByVinResult>
</getDefaultVehicleAndValueByVinResponse>
</soap:Body>
</soap:Envelope>
I would like to either parse the XML and retrieve something like
$vehicle_year = $xml->VehicleYear;
I have tried -
$xml = htmlspecialchars($clientC->__getLastResponse());
$response = strtr($xml, ['</soap:' => '</', '<soap:' => '<']);
$output = json_decode(json_encode(simplexml_load_string($response)));
var_dump($output->Body->getHighVehicleAndValueByVinResponse->VehicleYear);
But returns NULL
php xml soap
add a comment |
I have successfully been able to get a response from an API im working with, with the help of Brian Driscoll but am having trouble parsing that XML data. Here is the script to get the response and the returned XML data -
$clientC = new SoapClient('http://webservice.nada.com/vehicles/vehicle.asmx?wsdl',array('trace' => 1,'exceptions' => 1, 'cache_wsdl' => 0));
$params = new stdClass();
$params->Token = $token;
$params->Period = 1;
$params->VehicleType = "UsedCar";
$params->Vin = '5YFBURHE3FP331896';
$params->Region = 10;
$params->Mileage = 100;
$result = $clientC->getDefaultVehicleAndValueByVin(array('vehicleRequest' => $params));
$xml = htmlspecialchars($clientC->__getLastResponse());
This returns -
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getDefaultVehicleAndValueByVinResponse xmlns="http://webservice.nada.com/">
<getDefaultVehicleAndValueByVinResult>
<Uid>1182699</Uid>
<VehicleYear>2015</VehicleYear>
<MakeCode>47</MakeCode>
</getDefaultVehicleAndValueByVinResult>
</getDefaultVehicleAndValueByVinResponse>
</soap:Body>
</soap:Envelope>
I would like to either parse the XML and retrieve something like
$vehicle_year = $xml->VehicleYear;
I have tried -
$xml = htmlspecialchars($clientC->__getLastResponse());
$response = strtr($xml, ['</soap:' => '</', '<soap:' => '<']);
$output = json_decode(json_encode(simplexml_load_string($response)));
var_dump($output->Body->getHighVehicleAndValueByVinResponse->VehicleYear);
But returns NULL
php xml soap
Why do you try to handle xml as json? PHP has a few xml extensions. Have a look at them
– kuh-chan
Mar 26 at 19:34
Thanks, Im just more familiar with JSON, havent used XML much
– Ryan D
Mar 26 at 19:34
1
By the way - doesn't htmlspecialchars destroy your xml as it replaces<and>?
– kuh-chan
Mar 26 at 19:39
@kuh-chan yes you are correct, removing that was imperative!
– Ryan D
Mar 26 at 19:42
add a comment |
I have successfully been able to get a response from an API im working with, with the help of Brian Driscoll but am having trouble parsing that XML data. Here is the script to get the response and the returned XML data -
$clientC = new SoapClient('http://webservice.nada.com/vehicles/vehicle.asmx?wsdl',array('trace' => 1,'exceptions' => 1, 'cache_wsdl' => 0));
$params = new stdClass();
$params->Token = $token;
$params->Period = 1;
$params->VehicleType = "UsedCar";
$params->Vin = '5YFBURHE3FP331896';
$params->Region = 10;
$params->Mileage = 100;
$result = $clientC->getDefaultVehicleAndValueByVin(array('vehicleRequest' => $params));
$xml = htmlspecialchars($clientC->__getLastResponse());
This returns -
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getDefaultVehicleAndValueByVinResponse xmlns="http://webservice.nada.com/">
<getDefaultVehicleAndValueByVinResult>
<Uid>1182699</Uid>
<VehicleYear>2015</VehicleYear>
<MakeCode>47</MakeCode>
</getDefaultVehicleAndValueByVinResult>
</getDefaultVehicleAndValueByVinResponse>
</soap:Body>
</soap:Envelope>
I would like to either parse the XML and retrieve something like
$vehicle_year = $xml->VehicleYear;
I have tried -
$xml = htmlspecialchars($clientC->__getLastResponse());
$response = strtr($xml, ['</soap:' => '</', '<soap:' => '<']);
$output = json_decode(json_encode(simplexml_load_string($response)));
var_dump($output->Body->getHighVehicleAndValueByVinResponse->VehicleYear);
But returns NULL
php xml soap
I have successfully been able to get a response from an API im working with, with the help of Brian Driscoll but am having trouble parsing that XML data. Here is the script to get the response and the returned XML data -
$clientC = new SoapClient('http://webservice.nada.com/vehicles/vehicle.asmx?wsdl',array('trace' => 1,'exceptions' => 1, 'cache_wsdl' => 0));
$params = new stdClass();
$params->Token = $token;
$params->Period = 1;
$params->VehicleType = "UsedCar";
$params->Vin = '5YFBURHE3FP331896';
$params->Region = 10;
$params->Mileage = 100;
$result = $clientC->getDefaultVehicleAndValueByVin(array('vehicleRequest' => $params));
$xml = htmlspecialchars($clientC->__getLastResponse());
This returns -
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getDefaultVehicleAndValueByVinResponse xmlns="http://webservice.nada.com/">
<getDefaultVehicleAndValueByVinResult>
<Uid>1182699</Uid>
<VehicleYear>2015</VehicleYear>
<MakeCode>47</MakeCode>
</getDefaultVehicleAndValueByVinResult>
</getDefaultVehicleAndValueByVinResponse>
</soap:Body>
</soap:Envelope>
I would like to either parse the XML and retrieve something like
$vehicle_year = $xml->VehicleYear;
I have tried -
$xml = htmlspecialchars($clientC->__getLastResponse());
$response = strtr($xml, ['</soap:' => '</', '<soap:' => '<']);
$output = json_decode(json_encode(simplexml_load_string($response)));
var_dump($output->Body->getHighVehicleAndValueByVinResponse->VehicleYear);
But returns NULL
php xml soap
php xml soap
edited Mar 26 at 19:31
Ryan D
asked Mar 26 at 19:17
Ryan DRyan D
3662 silver badges13 bronze badges
3662 silver badges13 bronze badges
Why do you try to handle xml as json? PHP has a few xml extensions. Have a look at them
– kuh-chan
Mar 26 at 19:34
Thanks, Im just more familiar with JSON, havent used XML much
– Ryan D
Mar 26 at 19:34
1
By the way - doesn't htmlspecialchars destroy your xml as it replaces<and>?
– kuh-chan
Mar 26 at 19:39
@kuh-chan yes you are correct, removing that was imperative!
– Ryan D
Mar 26 at 19:42
add a comment |
Why do you try to handle xml as json? PHP has a few xml extensions. Have a look at them
– kuh-chan
Mar 26 at 19:34
Thanks, Im just more familiar with JSON, havent used XML much
– Ryan D
Mar 26 at 19:34
1
By the way - doesn't htmlspecialchars destroy your xml as it replaces<and>?
– kuh-chan
Mar 26 at 19:39
@kuh-chan yes you are correct, removing that was imperative!
– Ryan D
Mar 26 at 19:42
Why do you try to handle xml as json? PHP has a few xml extensions. Have a look at them
– kuh-chan
Mar 26 at 19:34
Why do you try to handle xml as json? PHP has a few xml extensions. Have a look at them
– kuh-chan
Mar 26 at 19:34
Thanks, Im just more familiar with JSON, havent used XML much
– Ryan D
Mar 26 at 19:34
Thanks, Im just more familiar with JSON, havent used XML much
– Ryan D
Mar 26 at 19:34
1
1
By the way - doesn't htmlspecialchars destroy your xml as it replaces
< and >?– kuh-chan
Mar 26 at 19:39
By the way - doesn't htmlspecialchars destroy your xml as it replaces
< and >?– kuh-chan
Mar 26 at 19:39
@kuh-chan yes you are correct, removing that was imperative!
– Ryan D
Mar 26 at 19:42
@kuh-chan yes you are correct, removing that was imperative!
– Ryan D
Mar 26 at 19:42
add a comment |
1 Answer
1
active
oldest
votes
This is the usual problem of having various namespaces which you need to navigate around. The root node defines xmlns:soap so you can use that without having to do anything, so the XPath uses //soap:Body/* to find the element inside the body tag, as xpath() returns a list of matching nodes, use [0] to just pick the only one out.
As the body data is all under a default namespace (defined as xmlns="http://webservice.nada.com/") you can extract all of them using $data->children("http://webservice.nada.com/"). This now allows you to use standard object notation to access the values.
One thing to note is although echo automatically converts it to a string, if you use these values elsewhere - you may need to convert it using (string) as the item is in fact a SimpleXMLElement.
$data = <<< XML
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getDefaultVehicleAndValueByVinResponse xmlns="http://webservice.nada.com/">
<getDefaultVehicleAndValueByVinResult>
<Uid>1182699</Uid>
<VehicleYear>2015</VehicleYear>
<MakeCode>47</MakeCode>
</getDefaultVehicleAndValueByVinResult>
</getDefaultVehicleAndValueByVinResponse>
</soap:Body>
</soap:Envelope>
XML;
$xml = simplexml_load_string($data);
$data = $xml->xpath("//soap:Body/*")[0];
$details = $data->children("http://webservice.nada.com/");
echo (string)$details->getDefaultVehicleAndValueByVinResult->VehicleYear;
Thank you s much for the great explanation! This is a huge help cheers mate!
– Ryan D
Mar 26 at 19:41
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55364740%2fparse-xml-data-from-php-soap-response%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is the usual problem of having various namespaces which you need to navigate around. The root node defines xmlns:soap so you can use that without having to do anything, so the XPath uses //soap:Body/* to find the element inside the body tag, as xpath() returns a list of matching nodes, use [0] to just pick the only one out.
As the body data is all under a default namespace (defined as xmlns="http://webservice.nada.com/") you can extract all of them using $data->children("http://webservice.nada.com/"). This now allows you to use standard object notation to access the values.
One thing to note is although echo automatically converts it to a string, if you use these values elsewhere - you may need to convert it using (string) as the item is in fact a SimpleXMLElement.
$data = <<< XML
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getDefaultVehicleAndValueByVinResponse xmlns="http://webservice.nada.com/">
<getDefaultVehicleAndValueByVinResult>
<Uid>1182699</Uid>
<VehicleYear>2015</VehicleYear>
<MakeCode>47</MakeCode>
</getDefaultVehicleAndValueByVinResult>
</getDefaultVehicleAndValueByVinResponse>
</soap:Body>
</soap:Envelope>
XML;
$xml = simplexml_load_string($data);
$data = $xml->xpath("//soap:Body/*")[0];
$details = $data->children("http://webservice.nada.com/");
echo (string)$details->getDefaultVehicleAndValueByVinResult->VehicleYear;
Thank you s much for the great explanation! This is a huge help cheers mate!
– Ryan D
Mar 26 at 19:41
add a comment |
This is the usual problem of having various namespaces which you need to navigate around. The root node defines xmlns:soap so you can use that without having to do anything, so the XPath uses //soap:Body/* to find the element inside the body tag, as xpath() returns a list of matching nodes, use [0] to just pick the only one out.
As the body data is all under a default namespace (defined as xmlns="http://webservice.nada.com/") you can extract all of them using $data->children("http://webservice.nada.com/"). This now allows you to use standard object notation to access the values.
One thing to note is although echo automatically converts it to a string, if you use these values elsewhere - you may need to convert it using (string) as the item is in fact a SimpleXMLElement.
$data = <<< XML
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getDefaultVehicleAndValueByVinResponse xmlns="http://webservice.nada.com/">
<getDefaultVehicleAndValueByVinResult>
<Uid>1182699</Uid>
<VehicleYear>2015</VehicleYear>
<MakeCode>47</MakeCode>
</getDefaultVehicleAndValueByVinResult>
</getDefaultVehicleAndValueByVinResponse>
</soap:Body>
</soap:Envelope>
XML;
$xml = simplexml_load_string($data);
$data = $xml->xpath("//soap:Body/*")[0];
$details = $data->children("http://webservice.nada.com/");
echo (string)$details->getDefaultVehicleAndValueByVinResult->VehicleYear;
Thank you s much for the great explanation! This is a huge help cheers mate!
– Ryan D
Mar 26 at 19:41
add a comment |
This is the usual problem of having various namespaces which you need to navigate around. The root node defines xmlns:soap so you can use that without having to do anything, so the XPath uses //soap:Body/* to find the element inside the body tag, as xpath() returns a list of matching nodes, use [0] to just pick the only one out.
As the body data is all under a default namespace (defined as xmlns="http://webservice.nada.com/") you can extract all of them using $data->children("http://webservice.nada.com/"). This now allows you to use standard object notation to access the values.
One thing to note is although echo automatically converts it to a string, if you use these values elsewhere - you may need to convert it using (string) as the item is in fact a SimpleXMLElement.
$data = <<< XML
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getDefaultVehicleAndValueByVinResponse xmlns="http://webservice.nada.com/">
<getDefaultVehicleAndValueByVinResult>
<Uid>1182699</Uid>
<VehicleYear>2015</VehicleYear>
<MakeCode>47</MakeCode>
</getDefaultVehicleAndValueByVinResult>
</getDefaultVehicleAndValueByVinResponse>
</soap:Body>
</soap:Envelope>
XML;
$xml = simplexml_load_string($data);
$data = $xml->xpath("//soap:Body/*")[0];
$details = $data->children("http://webservice.nada.com/");
echo (string)$details->getDefaultVehicleAndValueByVinResult->VehicleYear;
This is the usual problem of having various namespaces which you need to navigate around. The root node defines xmlns:soap so you can use that without having to do anything, so the XPath uses //soap:Body/* to find the element inside the body tag, as xpath() returns a list of matching nodes, use [0] to just pick the only one out.
As the body data is all under a default namespace (defined as xmlns="http://webservice.nada.com/") you can extract all of them using $data->children("http://webservice.nada.com/"). This now allows you to use standard object notation to access the values.
One thing to note is although echo automatically converts it to a string, if you use these values elsewhere - you may need to convert it using (string) as the item is in fact a SimpleXMLElement.
$data = <<< XML
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getDefaultVehicleAndValueByVinResponse xmlns="http://webservice.nada.com/">
<getDefaultVehicleAndValueByVinResult>
<Uid>1182699</Uid>
<VehicleYear>2015</VehicleYear>
<MakeCode>47</MakeCode>
</getDefaultVehicleAndValueByVinResult>
</getDefaultVehicleAndValueByVinResponse>
</soap:Body>
</soap:Envelope>
XML;
$xml = simplexml_load_string($data);
$data = $xml->xpath("//soap:Body/*")[0];
$details = $data->children("http://webservice.nada.com/");
echo (string)$details->getDefaultVehicleAndValueByVinResult->VehicleYear;
answered Mar 26 at 19:38
Nigel RenNigel Ren
32.6k6 gold badges20 silver badges37 bronze badges
32.6k6 gold badges20 silver badges37 bronze badges
Thank you s much for the great explanation! This is a huge help cheers mate!
– Ryan D
Mar 26 at 19:41
add a comment |
Thank you s much for the great explanation! This is a huge help cheers mate!
– Ryan D
Mar 26 at 19:41
Thank you s much for the great explanation! This is a huge help cheers mate!
– Ryan D
Mar 26 at 19:41
Thank you s much for the great explanation! This is a huge help cheers mate!
– Ryan D
Mar 26 at 19:41
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55364740%2fparse-xml-data-from-php-soap-response%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why do you try to handle xml as json? PHP has a few xml extensions. Have a look at them
– kuh-chan
Mar 26 at 19:34
Thanks, Im just more familiar with JSON, havent used XML much
– Ryan D
Mar 26 at 19:34
1
By the way - doesn't htmlspecialchars destroy your xml as it replaces
<and>?– kuh-chan
Mar 26 at 19:39
@kuh-chan yes you are correct, removing that was imperative!
– Ryan D
Mar 26 at 19:42