What `source` are you looking for? I see it twice in the `sample_xml` field. This doesn't seem very safe, can you look for the whole substring that you're expecting? And add some comments explaining why you expect it to be present here (and why you expect it to be gone, later in the file?)