1--TEST-- 2DOMNode::after() with namespace 3--EXTENSIONS-- 4dom 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->append($item); 18 19$item2 = $doc->createElementNS('http://base.google.com/ns/1.0', 'g:item_type', 'street'); 20$item->after($item2); 21 22echo $doc->saveXML(), "\n"; 23?> 24--EXPECT-- 25<?xml version="1.0" encoding="utf-8"?> 26<element xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0"> 27 <g:item_type>house</g:item_type> 28 <g:item_type>street</g:item_type> 29</element> 30