loadXMLString

Does loadXMLString just take a string which contains the xml content (i.e. the exact same content that would be found in an xml file)?

Yes, the command accepts string which contains XML in exactly the same format as used for loadXML command ( basically loadXMLString is a wrapper, which converts string to object add use same logic as loadXML for further processing )