added conditionals to XmlParser