public function MoveToNextNamespace( $namespaceScope = XPathNamespaceScope::Local )
	{
		if ( is_null( $this->domNode ) ) return false;
		if ( $this->domNode->nodeType != XML_NAMESPACE_DECL_NODE ) return false;

		$expression = $namespaceScope == XPathNamespaceScope::Local
			? 'namespace::*[not(. = ../../namespace::*)]'
			: 'namespace::*';

		$xpath = new \DOMXPath( $this->domNode->nodeType == XML_DOCUMENT_NODE ? $this->domNode : $this->domNode->ownerDocument );
		$namespaces = $xpath->query( $expression, $this->domNode->parentNode );

		if ( ! count( $namespaces ) ) return false;

		// Find the current node among the enties in the $namespaces list
		$current = -1;
		foreach ( $namespaces as $node )
		{
			$current++;
			// Can't use the ->isSameNode() function with a DOMNamespaceNode for some reason
			// So this concoction is used instead.
			if ( $this->domNode->parentNode->getNodePath()  . "/" . $this->domNode->nodeName == $node->parentNode->getNodePath()  . "/" . $node->nodeName )
			{
				break;
			}
		}

		if ( $current <= 0 ) return false;

		$current--;

		$this->domNode = $namespaces[ $current ];
		return true;
	}