Make sure to case the SimpleXMLElement types to the correct thing