in reply to What is the best way to get the response payload
while(<RESPONSE>){last if /^<?xml/} while(<RESPONSE>) { #all the lines read here will be the xml document. } [download]