protected function getDom()
{
if (!$this->XML) {
throw new LogicException('You must open an XML first');
}
if (!$this->DOM) {
$this->DOM = new \DOMDocument();
/**
* We shut up the warning to exclude an exception in case Warnings are
* transformed in exception
*/
if (!@$this->DOM->loadXML($this->XML)) {
throw new ParseError('Unable to load XML');
}
}
return $this->DOM;
}