1--TEST--
2DOM-Parsing GH-47 (XML null namespaces need to be preserved)
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$document = Dom\XMLDocument::createFromString(<<<XML
9<!DOCTYPE html>
10<html xmlns="http://www.w3.org/1999/xhtml">
11  <head>
12    <people xmlns="">
13      <person>
14        <lastname>Smith</lastname>
15        <firstname>Joe</firstname>
16      </person>
17      <person>
18        <lastname>Jones</lastname>
19        <firstname>John</firstname>
20      </person>
21    </people>
22  </head>
23</html>
24XML);
25
26echo $document->saveXml(), "\n";
27
28$people = $document->getElementsByTagNameNS(null, 'people')->item(0);
29echo $document->saveXml($people), "\n";
30
31?>
32--EXPECT--
33<?xml version="1.0" encoding="UTF-8"?>
34<!DOCTYPE html>
35<html xmlns="http://www.w3.org/1999/xhtml">
36  <head>
37    <people xmlns="">
38      <person>
39        <lastname>Smith</lastname>
40        <firstname>Joe</firstname>
41      </person>
42      <person>
43        <lastname>Jones</lastname>
44        <firstname>John</firstname>
45      </person>
46    </people>
47  </head>
48</html>
49<people xmlns="">
50      <person>
51        <lastname>Smith</lastname>
52        <firstname>Joe</firstname>
53      </person>
54      <person>
55        <lastname>Jones</lastname>
56        <firstname>John</firstname>
57      </person>
58    </people>
59