Use the isXML function from Sizzle.