in reply to LWP::UserAgent return partial XML

So what I do code change here if I got such type of half XML file from server

Well, first I would start by reading some documentation that explains the website you're trying to communicate with