1--TEST-- 2GH-11404 (DOMDocument::savexml and friends omit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM) 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom1 = Dom\XMLDocument::createFromString('<?xml version="1.0" ?><with xmlns="some:ns" />'); 9 10$dom2 = Dom\XMLDocument::createFromString('<?xml version="1.0" ?><none />'); 11 12$dom1->documentElement->append( 13 $dom1->importNode( 14 $dom2->documentElement 15 ) 16); 17 18echo $dom1->saveXml(); 19?> 20--EXPECT-- 21<?xml version="1.0" encoding="UTF-8"?> 22<with xmlns="some:ns"><none xmlns=""/></with> 23