1

I'm just tring to generate next xml code by SimpleXMLElement() using :

<WebOrders xmlns="http://microsoft.com/wsdl/types/"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
           xmlns:xsd="http://www.w3.org/2001/XMLSchema">

But code like that

$webOrders = new SimpleXMLElement('<WebOrders/>');
$webOrders->addAttribute('xmlns', 'http://microsoft.com/wsdl/types/');
$webOrders->addAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
$webOrders->addAttribute('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema');

makes

<WebOrders xsi="http://www.w3.org/2001/XMLSchema-instance" xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://microsoft.com/wsdl/types/"><WebOrder/><WebOrder/></WebOrders>

only.

hakre
  • 193,403
  • 52
  • 435
  • 836

0 Answers0