Allow libxml Documents and Elements to be passed in (allows conversion of sub-elements)