builder.append(optionalPrefix); if (builder.charAt(builder.length() - 1) != ' ' && getBrowserVersion().hasFeature(JS_XML_SERIALIZER_BLANK_BEFORE_SELF_CLOSING)) { builder.append(" ");
/** * 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(); }
/** * 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(); }
/** * 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(); }
builder.append(optionalPrefix); if (builder.charAt(builder.length() - 1) != ' ' && getBrowserVersion().hasFeature(JS_XML_SERIALIZER_BLANK_BEFORE_SELF_CLOSING)) { builder.append(' ');
&& getBrowserVersion().hasFeature(JS_XML_SERIALIZER_HTML_DOCUMENT_FRAGMENT_ALWAYS_EMPTY)) { return ""; && getBrowserVersion().hasFeature(JS_XML_SERIALIZER_ROOT_CDATA_AS_ESCAPED_TEXT)) { final DomCDataSection domCData = (DomCDataSection) root.getDomNodeOrDie(); final String data = domCData.getData();
&& getBrowserVersion().hasFeature(JS_XML_SERIALIZER_HTML_DOCUMENT_FRAGMENT_ALWAYS_EMPTY)) { return ""; && getBrowserVersion().hasFeature(JS_XML_SERIALIZER_ROOT_CDATA_AS_ESCAPED_TEXT)) { final DomCDataSection domCData = (DomCDataSection) root.getDomNodeOrDie(); final String data = domCData.getData();