/** * tests if object is a XML Object * * @param o Object to check * @return boolean */ public static boolean isXML(Object o) { if (o instanceof Node || o instanceof NodeList) return true; if (o instanceof ObjectWrap) { return isXML(((ObjectWrap) o).getEmbededObject(null)); } try { XMLCaster.toXMLStruct(XMLUtil.parse(XMLUtil.toInputSource(null, o), null, false), false); return true; } catch (Exception outer) { return false; } }