Example usage for com.google.gwt.xml.client Node DOCUMENT_FRAGMENT_NODE

List of usage examples for com.google.gwt.xml.client Node DOCUMENT_FRAGMENT_NODE

Introduction

In this page you can find the example usage for com.google.gwt.xml.client Node DOCUMENT_FRAGMENT_NODE.

Prototype

short DOCUMENT_FRAGMENT_NODE

To view the source code for com.google.gwt.xml.client Node DOCUMENT_FRAGMENT_NODE.

Click Source Link

Document

The constant 11 denotes DOM nodes of type DocumentFragment.

Usage

From source file:client.net.sf.saxon.ce.xmldom.NodeXml.java

License:Apache License

/**
 * This method creates a new node of the correct type.
 * //ww w.  j a v a2s  .c o m
 * @param node - the supplied DOM JavaScript object
 * @return a Node object that corresponds to the DOM object
 */
public static Node build(JavaScriptObject node) {
    if (node == null) {
        return null;
    }
    short nodeType = XMLParserImpl.getNodeType(node);
    switch (nodeType) {
    case Node.ATTRIBUTE_NODE:
        return new AttrImpl(node);
    case Node.CDATA_SECTION_NODE:
        return new CDATASectionImpl(node);
    case Node.COMMENT_NODE:
        return new CommentImpl(node);
    case Node.DOCUMENT_FRAGMENT_NODE:
        return new DocumentFragmentImpl(node);
    case Node.DOCUMENT_NODE:
        return new DocumentImpl(node);
    case Node.ELEMENT_NODE:
        return new ElementImpl(node);
    case Node.PROCESSING_INSTRUCTION_NODE:
        return new ProcessingInstructionImpl(node);
    case Node.TEXT_NODE:
        return new TextImpl(node);
    default:
        return new NodeXml(node);
    }
}