protected function at(DOMNode $root, $query = null)
	{
		if ($root->nodeType === XML_TEXT_NODE)
		{
			// Text nodes are outputted directly
			$this->out .= htmlspecialchars($root->textContent,0);
		}
		else
		{
			$nodes = (isset($query)) ? $this->xpath->query($query, $root) : $root->childNodes;
			foreach ($nodes as $node)
			{
				$this->renderNode($node);
			}
		}
	}
protected function at(DOMNode $root, $query = null)
	{
		if ($root->nodeType === XML_TEXT_NODE)
		{
			// Text nodes are outputted directly
			$this->out .= htmlspecialchars($root->textContent,0);
		}
		else
		{
			$nodes = (isset($query)) ? $this->xpath->query($query, $root) : $root->childNodes;
			foreach ($nodes as $node)
			{
				$this->renderNode($node);
			}
		}
	}
protected function at ( DOMNode $ root , $ query = null ) { if ( $ root -> nodeType === XML_TEXT_NODE ) { // Text nodes are outputted directly $ this -> out .= htmlspecialchars ( $ root -> textContent , 0 ) ; } else { $ nodes = ( isset ( $ query ) ) ? $ this -> xpath -> query ( $ query , $ root ) : $ root -> childNodes ; foreach ( $ nodes as $ node ) { $ this -> renderNode ( $ node ) ; } } }
Render the content of given node

Matches the behaviour of an xsl:apply-templates element

@param  DOMNode $root  Context node
@param  string  $query XPath query used to filter which child nodes to render
@return void
Render the content of given node