String to XMLDocument. I have an xml document stored in a String variable. How do I take the String and parse it into an XMLDocument?

Q. How to parse an XML String?
A: Easy! No matter you using DOM (javax.xml.parsers.DocumentBuilder) or SAX (org.xml.sax.XMLReader), or vendor specific SAXParser/DOMParser, you all can use the same signature method parse(InputSource input) to parse you XML. Now the question becomes how to use String to make an InputSource.