protected function removeContentFromVoidElements(DOMDocument $ir)
	{
		foreach ($this->query('//element[@void="yes"]') as $element)
		{
			$id    = $element->getAttribute('id');
			$query = './/closeTag[@id="' . $id . '"]/following-sibling::*';

			$this->removeNodes($ir, $query, $element);
		}
	}
protected function removeContentFromVoidElements(DOMDocument $ir)
	{
		foreach ($this->query('//element[@void="yes"]') as $element)
		{
			$id    = $element->getAttribute('id');
			$query = './/closeTag[@id="' . $id . '"]/following-sibling::*';

			$this->removeNodes($ir, $query, $element);
		}
	}
protected function removeContentFromVoidElements ( DOMDocument $ ir ) { foreach ( $ this -> query ( '//element[@void="yes"]' ) as $ element ) { $ id = $ element -> getAttribute ( 'id' ) ; $ query = './/closeTag[@id="' . $ id . '"]/following-sibling::*' ; $ this -> removeNodes ( $ ir , $ query , $ element ) ; } }
Remove content from void elements

For each void element, we find whichever <closeTag/> elements close it and remove everything
after

@param  DOMDocument $ir
@return void
Remove content from void elements