/** * 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().hasFeature(BrowserVersionFeatures.JS_XML_SERIALIZER_APPENDS_CRLF) && xml.endsWith("\r\n")) { xml = xml.substring(0, xml.length() - 2); } return xml; } return node.asXml(); } return Undefined.instance; }
/** * Contains the XML representation of the node and all its descendants. * @return an XML representation of this node and all its descendants */ @Override public String jsxGet_xml() { final XMLSerializer seralizer = new XMLSerializer(); seralizer.setParentScope(getWindow()); seralizer.setPrototype(getPrototype(seralizer.getClass())); return seralizer.jsxFunction_serializeToString(jsxGet_documentElement()); }
/** * The subtree rooted by the specified element is serialized to a string. * @param root the root of the subtree to be serialized (this may be any node, even a document) * @return the serialized string */ public String jsxFunction_serializeToString(Node root) { if (root instanceof Document) { root = ((Document) root).jsxGet_documentElement(); } else if (root instanceof DocumentFragment) { root = root.jsxGet_firstChild(); } if (root instanceof Element) { final StringBuilder buffer = new StringBuilder(); final boolean isIE = getBrowserVersion().isIE(); toXml(1, root.getDomNodeOrDie(), buffer, isIE); if (isIE) { buffer.append('\r').append('\n'); } return buffer.toString(); } if (root == null) { return ""; } return root.getDomNodeOrDie().asXml(); }
toXml(indent + 1, child, buffer, isIE); break;
/** * The subtree rooted by the specified element is serialized to a string. * @param root the root of the subtree to be serialized (this may be any node, even a document) * @return the serialized string */ public String jsxFunction_serializeToString(Node root) { if (root instanceof Document) { root = ((Document) root).jsxGet_documentElement(); } else if (root instanceof DocumentFragment) { root = root.jsxGet_firstChild(); } if (root instanceof Element) { final StringBuilder buffer = new StringBuilder(); final boolean isIE = getBrowserVersion().isIE(); toXml(1, root.getDomNodeOrDie(), buffer, isIE); if (isIE) { buffer.append('\r').append('\n'); } return buffer.toString(); } if (root == null) { return ""; } return root.getDomNodeOrDie().asXml(); }
toXml(indent + 1, child, buffer, isIE); break;
/** * 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; }
/** * Contains the XML representation of the node and all its descendants. * @return an XML representation of this node and all its descendants */ @Override public String jsxGet_xml() { final XMLSerializer seralizer = new XMLSerializer(); seralizer.setParentScope(getWindow()); seralizer.setPrototype(getPrototype(seralizer.getClass())); return seralizer.jsxFunction_serializeToString(jsxGet_documentElement()); }
/** * The subtree rooted by the specified element is serialized to a string. * @param root the root of the subtree to be serialized (this may be any node, even a document) * @return the serialized string */ public String jsxFunction_serializeToString(Node root) { if (root instanceof Document) { root = ((Document) root).jsxGet_documentElement(); } else if (root instanceof DocumentFragment) { root = root.jsxGet_firstChild(); } if (root instanceof Element) { final StringBuilder buffer = new StringBuilder(); final boolean isIE = getBrowserVersion().isIE(); toXml(1, root.getDomNodeOrDie(), buffer, isIE); if (isIE) { buffer.append('\r').append('\n'); } return buffer.toString(); } if (root == null) { return ""; } return root.getDomNodeOrDie().asXml(); }
toXml(indent + 1, child, buffer, isIE); break;
/** * 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; }
/** * Contains the XML representation of the node and all its descendants. * @return an XML representation of this node and all its descendants */ @Override public String jsxGet_xml() { final XMLSerializer seralizer = new XMLSerializer(); seralizer.setParentScope(getWindow()); seralizer.setPrototype(getPrototype(seralizer.getClass())); return seralizer.jsxFunction_serializeToString(jsxGet_documentElement()); }
toXml(indent + 1, child, builder, null); break; builder.append(optionalPrefix); if (builder.charAt(builder.length() - 1) != ' ' && getBrowserVersion().hasFeature(JS_XML_SERIALIZER_BLANK_BEFORE_SELF_CLOSING)) { builder.append(" ");
/** * 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; }
toXml(indent + 1, child, builder, null); break; builder.append(optionalPrefix); if (builder.charAt(builder.length() - 1) != ' ' && getBrowserVersion().hasFeature(JS_XML_SERIALIZER_BLANK_BEFORE_SELF_CLOSING)) { builder.append(' ');
final XMLSerializer serializer = new XMLSerializer(); serializer.setParentScope(getParentScope()); String output = ""; for (final DomNode child : ((Node) output_).getDomNodeOrDie().getChildren()) { serializer.jsxFunction_serializeToString((Node) child.getScriptObject()); output += serializedString.substring(0, serializedString.length() - 2);
&& getBrowserVersion().hasFeature(JS_XML_SERIALIZER_HTML_DOCUMENT_FRAGMENT_ALWAYS_EMPTY)) { return ""; forcedNamespace = "http://www.w3.org/1999/xhtml"; toXml(1, node, builder, forcedNamespace); && getBrowserVersion().hasFeature(JS_XML_SERIALIZER_ROOT_CDATA_AS_ESCAPED_TEXT)) { final DomCDataSection domCData = (DomCDataSection) root.getDomNodeOrDie(); final String data = domCData.getData();
final XMLSerializer serializer = new XMLSerializer(); serializer.setParentScope(getParentScope()); String output = ""; for (final DomNode child : ((Node) output_).getDomNodeOrDie().getChildren()) { serializer.jsxFunction_serializeToString((Node) child.getScriptObject()); output += serializedString.substring(0, serializedString.length() - 2);
&& getBrowserVersion().hasFeature(JS_XML_SERIALIZER_HTML_DOCUMENT_FRAGMENT_ALWAYS_EMPTY)) { return ""; forcedNamespace = "http://www.w3.org/1999/xhtml"; toXml(1, node, builder, forcedNamespace); && getBrowserVersion().hasFeature(JS_XML_SERIALIZER_ROOT_CDATA_AS_ESCAPED_TEXT)) { final DomCDataSection domCData = (DomCDataSection) root.getDomNodeOrDie(); final String data = domCData.getData();
final XMLSerializer serializer = new XMLSerializer(); serializer.setParentScope(getParentScope()); String output = ""; for (final DomNode child : ((Node) output_).getDomNodeOrDie().getChildren()) { serializer.jsxFunction_serializeToString((Node) child.getScriptObject()); output += serializedString.substring(0, serializedString.length() - 2);