public function getValue()
	{
		if ( is_null( $this->domNode ) )
		{
			return "";
		}

		if ( $this->domNode instanceof \DOMNameSpaceNode )
		{
			/** @var \DOMNameSpaceNode $ns */
			$ns = $this->domNode;
			return $ns->nodeValue;
		}

		// BMS 2017-12-30 This used to return the textContent property.
		// BMS 2018-01-23 Updated to return the text content when the node is the document root
		return $this->domNode instanceof \DOMDocument
			? $this->domNode->textContent
			: $this->domNode->nodeValue;
	}