I am using http://devdocs.magento.com/guides/m1x/api/soap/catalog/catalogProduct/catalog_product.info.html soap v2 version . but i need to response in xml.
1 Answer
Here is you responce.
$product = array(
'type'=> "simple",
'product_id'=> "10736",
'product_name'=> "Test",
'product_sku'=> "5432",
-------------------
);
now used below code for convert array to xml.
$xml = new SimpleXMLElement('<root/>');
array_walk_recursive($product, array ($xml, 'addChild'));
echo "<pre>";print $xml->asXML();
result is,
<?xml version="1.0"?>
<root>
<type>bla</type>
<product_id>10736</product_id>
<product_name>Test</product_name>
<product_sku>5432</product_sku>
</root>