Fixed some bugs where if the XML contained an example of other XML content the wrong data could be returned.