<?php $doc = new DOMDocument(); $root = $doc->appendChild($doc->createElement('root')); $root->setAttribute('xmlns:foo', 'uri:foo'); var_dump($root->hasAttribute('xmlns:foo'), $root->getAttribute('xmlns:foo')); foreach ($root->attributes as $k => $attribute) { var_dump($attribute->nodeName, $attribute->nodeValue); }
You have javascript disabled. You will not be able to edit any code.