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 1


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"?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.