getXmlElements

changed to support new getXmlElements param