A bridge between SimpleXML and the DOM extension, plus a bunch of convenience methods