/**
* Represents the xml content of the node and its descendants.
* @return the xml content of the node and its descendants
*/
public Object jsxGet_xml() {
final DomNode node = getDomNodeOrDie();
if (node.getPage() instanceof XmlPage) {
if (this instanceof Element) {
final XMLSerializer serializer = new XMLSerializer();
serializer.setParentScope(getParentScope());
String xml = serializer.jsxFunction_serializeToString(this);
if (getBrowserVersion().isIE() && xml.endsWith("\r\n")) {
xml = xml.substring(0, xml.length() - 2);
}
return xml;
}
return node.asXml();
}
return Undefined.instance;
}