1--TEST-- 2DOMNode::prepend() with namespace 3--SKIPIF-- 4<?php require_once('skipif.inc'); ?> 5--FILE-- 6<?php 7require_once("dom_test.inc"); 8 9$doc = new DOMDocument('1.0', 'utf-8'); 10$doc->formatOutput = true; 11 12$root = $doc->createElementNS('http://www.w3.org/2005/Atom', 'element'); 13$doc->appendChild($root); 14$root->setAttributeNS('http://www.w3.org/2000/xmlns/' ,'xmlns:g', 'http://base.google.com/ns/1.0'); 15 16$item = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'house'); 17$root->prepend($item); 18 19echo $doc->saveXML(), "\n"; 20?> 21--EXPECT-- 22<?xml version="1.0" encoding="utf-8"?> 23<element xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0"> 24 <g:item_type>house</g:item_type> 25</element> 26