I am trying to parse a XML string into `org.w3c.dom.Document` object.

I have looked at solutions provided in a few blogs that give a variation of the same solution that I have written. But the...