Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I cannot reproduce the first error</p> <pre><code>&lt;?php echo phpversion(), "\n"; // $xmlObj = simplexml_load_file('myXMLFile.xml'); $xmlObj = getDoc(); $nsNode = $xmlObj-&gt;command-&gt;create-&gt;children('urn:ietf:params:xml:ns:domain-1.0')-&gt;create-&gt;addChild('domain:ns'); $nsNode-&gt;addChild('foo', 'Mary had a little lamb...'); echo $xmlObj-&gt;asxml(); function getDoc() { return new SimpleXMLElement('&lt;epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd" &gt; &lt;command&gt; &lt;create&gt; &lt;domain:create xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd" &gt; &lt;domain:period unit="y"&gt;&lt;/domain:period&gt; &lt;/domain:create&gt; &lt;/create&gt; &lt;/command&gt; &lt;/epp&gt;'); } </code></pre> <p>prints</p> <pre><code>5.3.2 &lt;?xml version="1.0"?&gt; &lt;epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd"&gt; &lt;command&gt; &lt;create&gt; &lt;domain:create xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd"&gt; &lt;domain:period unit="y"/&gt; &lt;domain:ns&gt;&lt;domain:foo&gt;Mary had a little lamb...&lt;/domain:foo&gt;&lt;/domain:ns&gt;&lt;/domain:create&gt; &lt;/create&gt; &lt;/command&gt; &lt;/epp&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload