I have an XML file , which is not well-formed.
There's no such thing. If it's not well-formed then it's not XML.
If you have to deal with this data, then just drop "XML" from your thinking. It's not XML, forget all the XML tools and all the benefits you get from using a standardized format. You're dealing with a proprietary data format, and you're on your own without any tools.
Of course, it might be close enough to XML that your best strategy is to convert it to XML before doing any further processing.