Created generic getXmlElement helper