Run
Online Code Editor
It is an example of using the jQuery isXMLDoc() method
Is xmlDoc1 within/an XML document?
Is xmlDoc2 within/an XML document?