Not strictly a Magento 2 thing, but if you have code that looks like this in your extension
namespace FooBazBar;
//...
if( $node instanceof SimpleXMLElement) {}
You’ll need to make sure that SimpleXMLElement is actually used in your current namespace.
namespace FooBazBar;
use SimpleXMLElement
//...
if( $node instanceof SimpleXMLElement) {}
Otherwise the instanceof operator will be looking for an instance of FooBazBarSimpleXMLElement, and not SimpleXMLElement.