Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
mini slassic
class Xml extends \DOMImplementation
{
public function __construct()
{
$this->dom = $this->createDocument();
$this->dom->encoding = 'utf-8';
$this->dom->formatOutput = true;
$this->dom->preserveWhiteSpace = false;
}
function addElement($node, $name, $text = '')
{
$element = $this->dom->createElement($name, $text);
$node->appendChild($element);
return $element;
}
public function getDocument()
{
return $this->dom->saveXML();
}
}
$this->xml = new Xml();
$xmlMassage = $this->xml->addElement($this->xml->dom, 'Massage');
$xmlOrder = $this->xml->addElement($xmlMassage, 'Order');
$this->xml->addElement($xmlOrder, 'orderID', 416267);
...
return $this->xml->getDocument();
are the server page encoding versions by default on this and that machine exactly the same?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question