org.w3c.dom.DocumentType Java Examples

The following examples show how to use org.w3c.dom.DocumentType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PayaraDDProvider.java    From netbeans with Apache License 2.0 6 votes vote down vote up
private void initialize(Document d, SAXParseException saxEx, String defaultPublicId) {
    document = d;
    saxException = saxEx;
    documentInfo = null;
    // TODO Handle default version better.
    version = "unknown"; // NOI18N

    // first check the doc type to see if there is one
    DocumentType dt = document.getDoctype();
    if (dt != null) {
        documentInfo = publicIdToInfoMap.get(dt.getPublicId());
    } else if (defaultPublicId != null) {
        documentInfo = publicIdToInfoMap.get(defaultPublicId);
    }

    if (documentInfo != null) {
        version = documentInfo.getVersion();
    }
}
 
Example #2
Source File: DefaultComparisonFormatter.java    From xmlunit with Apache License 2.0 6 votes vote down vote up
/**
 * Appends the XML DOCTYPE for {@link #getShortString} or {@link #appendFullDocumentHeader} if present.
 *
 * @param sb the builder to append to
 * @param type the document type
 * @return true if the DOCTPYE has been appended
 *
 * @since XMLUnit 2.4.0
 */
protected boolean appendDocumentType(StringBuilder sb, DocumentType type) {
    if (type == null) {
        return false;
    }
    sb.append("<!DOCTYPE ").append(type.getName());
    boolean hasNoPublicId = true;
    if (type.getPublicId() != null && type.getPublicId().length() > 0) {
        sb.append(" PUBLIC \"").append(type.getPublicId()).append('"');
        hasNoPublicId = false;
    }
    if (type.getSystemId() != null && type.getSystemId().length() > 0) {
        if (hasNoPublicId) {
            sb.append(" SYSTEM");
        }
        sb.append(" \"").append(type.getSystemId()).append("\"");
    }
    sb.append(">");
    return true;
}
 
Example #3
Source File: XmlUtil.java    From synopsys-detect with Apache License 2.0 6 votes vote down vote up
public static List<Node> getNodeList(final String key, final Node parentNode) {
    final List<Node> nodes = new ArrayList<>();
    final NodeList childNodes = parentNode.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        final Node childNode = childNodes.item(i);
        if (childNode.getNodeName().equals(key)) {
            // ignore node generated from DOCTYPE declaration
            if (childNode instanceof DocumentType) {
                Node nextSibling = childNode.getNextSibling();
                if (nextSibling.getNodeName().equals(key)) {
                    nodes.add(nextSibling);
                }
            } else {
                nodes.add(childNode);
            }
        }
    }
    return nodes;
}
 
Example #4
Source File: NodeDescriptor.java    From xmlunit with Apache License 2.0 6 votes vote down vote up
protected static void appendDocumentTypeDetail(StringBuffer buf, Node aNode) {
    DocumentType type = (DocumentType) aNode;
    buf.append(XMLConstants.START_DOCTYPE).append(type.getName());
    boolean hasNoPublicId = true;
    if (type.getPublicId()!=null
        && type.getPublicId().length() > 0) {
        buf.append(" PUBLIC \"").append(type.getPublicId())
            .append('"');
        hasNoPublicId = false;
    }
    if (type.getSystemId()!=null
        && type.getSystemId().length() > 0) {
        if (hasNoPublicId) {
            buf.append(" SYSTEM");
        }
        buf.append(" \"").append(type.getSystemId())
            .append('"');
    }
}
 
Example #5
Source File: CoreDocumentImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** For DOM2 support. */
public CoreDocumentImpl(DocumentType doctype, boolean grammarAccess) {
    this(grammarAccess);
    if (doctype != null) {
        DocumentTypeImpl doctypeImpl;
        try {
            doctypeImpl = (DocumentTypeImpl) doctype;
        } catch (ClassCastException e) {
            String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null);
            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg);
        }
        doctypeImpl.ownerDocument = this;
        appendChild(doctype);
    }
}
 
Example #6
Source File: CoreDocumentImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** For DOM2 support. */
public CoreDocumentImpl(DocumentType doctype, boolean grammarAccess) {
    this(grammarAccess);
    if (doctype != null) {
        DocumentTypeImpl doctypeImpl;
        try {
            doctypeImpl = (DocumentTypeImpl) doctype;
        } catch (ClassCastException e) {
            String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null);
            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg);
        }
        doctypeImpl.ownerDocument = this;
        appendChild(doctype);
    }
}
 
Example #7
Source File: SAXImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * The getUnparsedEntityURI function returns the URI of the unparsed
 * entity with the specified name in the same document as the context
 * node (see [3.3 Unparsed Entities]). It returns the empty string if
 * there is no such entity.
 */
public String getUnparsedEntityURI(String name)
{
    // Special handling for DOM input
    if (_document != null) {
        String uri = "";
        DocumentType doctype = _document.getDoctype();
        if (doctype != null) {
            NamedNodeMap entities = doctype.getEntities();

            if (entities == null) {
                return uri;
            }

            Entity entity = (Entity) entities.getNamedItem(name);

            if (entity == null) {
                return uri;
            }

            String notationName = entity.getNotationName();
            if (notationName != null) {
                uri = entity.getSystemId();
                if (uri == null) {
                    uri = entity.getPublicId();
                }
            }
        }
        return uri;
    }
    else {
        return super.getUnparsedEntityURI(name);
    }
}
 
Example #8
Source File: UnImplNode.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Unimplemented. See org.w3c.dom.Document
 *
 * @return null
 */
public DocumentType getDoctype()
{

  error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);

  return null;
}
 
Example #9
Source File: DOMValidatorHelper.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Extracts NamedNodeMap of entities. We need this to validate
 * elements and attributes of type xs:ENTITY, xs:ENTITIES or
 * types dervied from them.
 */
private void setupEntityMap(Document doc) {
    if (doc != null) {
        DocumentType docType = doc.getDoctype();
        if (docType != null) {
            fEntities = docType.getEntities();
            return;
        }
    }
    fEntities = null;
}
 
Example #10
Source File: DOMResultBuilder.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public void doctypeDecl(DocumentType node) throws XNIException {
    /** Create new DocumentType node for the target. */
    if (fDocumentImpl != null) {
        DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId());
        final String internalSubset = node.getInternalSubset();
        /** Copy internal subset. */
        if (internalSubset != null) {
            ((DocumentTypeImpl) docType).setInternalSubset(internalSubset);
        }
        /** Copy entities. */
        NamedNodeMap oldMap = node.getEntities();
        NamedNodeMap newMap = docType.getEntities();
        int length = oldMap.getLength();
        for (int i = 0; i < length; ++i) {
            Entity oldEntity = (Entity) oldMap.item(i);
            EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName());
            newEntity.setPublicId(oldEntity.getPublicId());
            newEntity.setSystemId(oldEntity.getSystemId());
            newEntity.setNotationName(oldEntity.getNotationName());
            newMap.setNamedItem(newEntity);
        }
        /** Copy notations. */
        oldMap = node.getNotations();
        newMap = docType.getNotations();
        length = oldMap.getLength();
        for (int i = 0; i < length; ++i) {
            Notation oldNotation = (Notation) oldMap.item(i);
            NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
            newNotation.setPublicId(oldNotation.getPublicId());
            newNotation.setSystemId(oldNotation.getSystemId());
            newMap.setNamedItem(newNotation);
        }
        append(docType);
    }
}
 
Example #11
Source File: XmlUtils.java    From htmlunit with Apache License 2.0 5 votes vote down vote up
/**
 * Recursively appends a {@link Node} child to {@link DomNode} parent.
 *
 * @param page the owner page of {@link DomElement}s to be created
 * @param parent the parent DomNode
 * @param child the child Node
 * @param handleXHTMLAsHTML if true elements from the XHTML namespace are handled as HTML elements instead of
 *     DOM elements
 * @param attributesOrderMap (optional) the one returned by {@link #getAttributesOrderMap(Document)}
 */
public static void appendChild(final SgmlPage page, final DomNode parent, final Node child,
    final boolean handleXHTMLAsHTML, final Map<Integer, List<String>> attributesOrderMap) {
    final DocumentType documentType = child.getOwnerDocument().getDoctype();
    if (documentType != null && page instanceof XmlPage) {
        final DomDocumentType domDoctype = new DomDocumentType(
                page, documentType.getName(), documentType.getPublicId(), documentType.getSystemId());
        ((XmlPage) page).setDocumentType(domDoctype);
    }
    final DomNode childXml = createFrom(page, child, handleXHTMLAsHTML, attributesOrderMap);
    parent.appendChild(childXml);
    copy(page, child, childXml, handleXHTMLAsHTML, attributesOrderMap);
}
 
Example #12
Source File: DOMValidatorHelper.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Extracts NamedNodeMap of entities. We need this to validate
 * elements and attributes of type xs:ENTITY, xs:ENTITIES or
 * types dervied from them.
 */
private void setupEntityMap(Document doc) {
    if (doc != null) {
        DocumentType docType = doc.getDoctype();
        if (docType != null) {
            fEntities = docType.getEntities();
            return;
        }
    }
    fEntities = null;
}
 
Example #13
Source File: HtmlUtils.java    From openemm with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * Get a string representation of a doctype element and append it to a {@code builder}.
 * @param builder a string builder to write result to.
 * @param documentType a doctype element.
 */
public static void toString(StringBuilder builder, DocumentType documentType) {
    builder.append("<!DOCTYPE ").append(documentType.getName());

    if (StringUtils.isNotBlank(documentType.getPublicId())) {
        builder.append(" PUBLIC \"").append(documentType.getPublicId()).append('"');
    }

    if (StringUtils.isNotBlank(documentType.getSystemId())) {
        builder.append(" \"").append(documentType.getSystemId()).append('"');
    }

    builder.append('>');
}
 
Example #14
Source File: SAXImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The getUnparsedEntityURI function returns the URI of the unparsed
 * entity with the specified name in the same document as the context
 * node (see [3.3 Unparsed Entities]). It returns the empty string if
 * there is no such entity.
 */
public String getUnparsedEntityURI(String name)
{
    // Special handling for DOM input
    if (_document != null) {
        String uri = "";
        DocumentType doctype = _document.getDoctype();
        if (doctype != null) {
            NamedNodeMap entities = doctype.getEntities();

            if (entities == null) {
                return uri;
            }

            Entity entity = (Entity) entities.getNamedItem(name);

            if (entity == null) {
                return uri;
            }

            String notationName = entity.getNotationName();
            if (notationName != null) {
                uri = entity.getSystemId();
                if (uri == null) {
                    uri = entity.getPublicId();
                }
            }
        }
        return uri;
    }
    else {
        return super.getUnparsedEntityURI(name);
    }
}
 
Example #15
Source File: SAXImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * The getUnparsedEntityURI function returns the URI of the unparsed
 * entity with the specified name in the same document as the context
 * node (see [3.3 Unparsed Entities]). It returns the empty string if
 * there is no such entity.
 */
public String getUnparsedEntityURI(String name)
{
    // Special handling for DOM input
    if (_document != null) {
        String uri = "";
        DocumentType doctype = _document.getDoctype();
        if (doctype != null) {
            NamedNodeMap entities = doctype.getEntities();

            if (entities == null) {
                return uri;
            }

            Entity entity = (Entity) entities.getNamedItem(name);

            if (entity == null) {
                return uri;
            }

            String notationName = entity.getNotationName();
            if (notationName != null) {
                uri = entity.getSystemId();
                if (uri == null) {
                    uri = entity.getPublicId();
                }
            }
        }
        return uri;
    }
    else {
        return super.getUnparsedEntityURI(name);
    }
}
 
Example #16
Source File: DDProvider.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/**
 * @return version of deployment descriptor. 
 */
private void extractVersion () {
    // This is the default version
    version = Application.VERSION_7;
    
    // first check the doc type to see if there is one
    DocumentType dt = document.getDoctype();

    if(dt == null) {
        //check application node version attribute
        NodeList nl = document.getElementsByTagName("application");//NOI18N
        if(nl != null && nl.getLength() > 0) {
            Node appNode = nl.item(0);
            NamedNodeMap attrs = appNode.getAttributes();
            Node vNode = attrs.getNamedItem("version");//NOI18N
            if(vNode != null) {
                String versionValue = vNode.getNodeValue();
                if (Application.VERSION_1_4.equals(versionValue)) {
                    version = Application.VERSION_1_4;
                } else if (Application.VERSION_5.equals(versionValue)) {
                    version = Application.VERSION_5;
                } else if (Application.VERSION_6.equals(versionValue)) {
                    version = Application.VERSION_6;
                } else {
                    version = Application.VERSION_7; //default
                }
            }
        }
    }
}
 
Example #17
Source File: XmlSupport.java    From java-scanner-access-twain with GNU Affero General Public License v3.0 5 votes vote down vote up
private static Document createPrefsDoc( String qname ) {
    try {
        DOMImplementation di = DocumentBuilderFactory.newInstance().
            newDocumentBuilder().getDOMImplementation();
        DocumentType dt = di.createDocumentType(qname, null, PREFS_DTD_URI);
        return di.createDocument(null, qname, dt);
    } catch(ParserConfigurationException e) {
        throw new AssertionError(e);
    }
}
 
Example #18
Source File: DOMResultBuilder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void doctypeDecl(DocumentType node) throws XNIException {
    /** Create new DocumentType node for the target. */
    if (fDocumentImpl != null) {
        DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId());
        final String internalSubset = node.getInternalSubset();
        /** Copy internal subset. */
        if (internalSubset != null) {
            ((DocumentTypeImpl) docType).setInternalSubset(internalSubset);
        }
        /** Copy entities. */
        NamedNodeMap oldMap = node.getEntities();
        NamedNodeMap newMap = docType.getEntities();
        int length = oldMap.getLength();
        for (int i = 0; i < length; ++i) {
            Entity oldEntity = (Entity) oldMap.item(i);
            EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName());
            newEntity.setPublicId(oldEntity.getPublicId());
            newEntity.setSystemId(oldEntity.getSystemId());
            newEntity.setNotationName(oldEntity.getNotationName());
            newMap.setNamedItem(newEntity);
        }
        /** Copy notations. */
        oldMap = node.getNotations();
        newMap = docType.getNotations();
        length = oldMap.getLength();
        for (int i = 0; i < length; ++i) {
            Notation oldNotation = (Notation) oldMap.item(i);
            NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
            newNotation.setPublicId(oldNotation.getPublicId());
            newNotation.setSystemId(oldNotation.getSystemId());
            newMap.setNamedItem(newNotation);
        }
        append(docType);
    }
}
 
Example #19
Source File: UnImplNode.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Unimplemented. See org.w3c.dom.Document
 *
 * @return null
 */
public DocumentType getDoctype()
{

  error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);

  return null;
}
 
Example #20
Source File: DifferenceEvaluators.java    From xmlunit with Apache License 2.0 5 votes vote down vote up
private static boolean belongsToProlog(Node n,
                                       boolean ignoreDoctypeDeclarationAsWell) {
    if (n == null || n instanceof Element) {
        return false;
    }
    if (!ignoreDoctypeDeclarationAsWell && n instanceof DocumentType) {
        return false;
    }
    if (n instanceof Document) {
        return true;
    }
    return belongsToProlog(n.getParentNode(), ignoreDoctypeDeclarationAsWell);
}
 
Example #21
Source File: CoreDocumentImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** For DOM2 support. */
public CoreDocumentImpl(DocumentType doctype, boolean grammarAccess) {
    this(grammarAccess);
    if (doctype != null) {
        DocumentTypeImpl doctypeImpl;
        try {
            doctypeImpl = (DocumentTypeImpl) doctype;
        } catch (ClassCastException e) {
            String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null);
            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg);
        }
        doctypeImpl.ownerDocument = this;
        appendChild(doctype);
    }
}
 
Example #22
Source File: CoreDocumentImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * For XML, this provides access to the Document Type Definition.
 * For HTML documents, and XML documents which don't specify a DTD,
 * it will be null.
 */
public DocumentType getDoctype() {
    if (needsSyncChildren()) {
        synchronizeChildren();
    }
    return docType;
}
 
Example #23
Source File: DomImplementationTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testCreateDocumentType02() throws ParserConfigurationException {
    final String name = "document:localName";
    final String publicId = "-//W3C//DTD HTML 4.0 Transitional//EN";
    final String systemId = "http://www.w3.org/TR/REC-html40/loose.dtd";
    DOMImplementation domImpl = getDOMImplementation();

    DocumentType documentType = domImpl.createDocumentType(name, publicId, systemId);
    Document document = domImpl.createDocument("http://www.document.com", "document:localName", documentType);
    verifyDocumentType(document.getDoctype(), name, publicId, systemId);
}
 
Example #24
Source File: DOMValidatorHelper.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Extracts NamedNodeMap of entities. We need this to validate
 * elements and attributes of type xs:ENTITY, xs:ENTITIES or
 * types dervied from them.
 */
private void setupEntityMap(Document doc) {
    if (doc != null) {
        DocumentType docType = doc.getDoctype();
        if (docType != null) {
            fEntities = docType.getEntities();
            return;
        }
    }
    fEntities = null;
}
 
Example #25
Source File: XmlUtil.java    From HtmlUnit-Android with Apache License 2.0 5 votes vote down vote up
/**
 * Recursively appends a {@link Node} child to {@link DomNode} parent.
 *
 * @param page the owner page of {@link DomElement}s to be created
 * @param parent the parent DomNode
 * @param child the child Node
 * @param handleXHTMLAsHTML if true elements from the XHTML namespace are handled as HTML elements instead of
 *     DOM elements
 * @param attributesOrderMap (optional) the one returned by {@link #getAttributesOrderMap(Document)}
 */
public static void appendChild(final SgmlPage page, final DomNode parent, final Node child,
    final boolean handleXHTMLAsHTML, final Map<Integer, List<String>> attributesOrderMap) {
    final DocumentType documentType = child.getOwnerDocument().getDoctype();
    if (documentType != null && page instanceof XmlPage) {
        final DomDocumentType domDoctype = new DomDocumentType(
                page, documentType.getName(), documentType.getPublicId(), documentType.getSystemId());
        ((XmlPage) page).setDocumentType(domDoctype);
    }
    final DomNode childXml = createFrom(page, child, handleXHTMLAsHTML, attributesOrderMap);
    parent.appendChild(childXml);
    copy(page, child, childXml, handleXHTMLAsHTML, attributesOrderMap);
}
 
Example #26
Source File: XmlUtil.java    From HtmlUnit-Android with Apache License 2.0 4 votes vote down vote up
private static DomNode createFrom(final SgmlPage page, final Node source, final boolean handleXHTMLAsHTML,
        final Map<Integer, List<String>> attributesOrderMap) {
    if (source.getNodeType() == Node.TEXT_NODE) {
        return new DomText(page, source.getNodeValue());
    }
    if (source.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
        return new DomProcessingInstruction(page, source.getNodeName(), source.getNodeValue());
    }
    if (source.getNodeType() == Node.COMMENT_NODE) {
        return new DomComment(page, source.getNodeValue());
    }
    if (source.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
        final DocumentType documentType = (DocumentType) source;
        return new DomDocumentType(page, documentType.getName(), documentType.getPublicId(),
                documentType.getSystemId());
    }
    final String ns = source.getNamespaceURI();
    String localName = source.getLocalName();
    if (handleXHTMLAsHTML && HTMLParser.XHTML_NAMESPACE.equals(ns)) {
        final ElementFactory factory = HTMLParser.getFactory(localName);
        return factory.createElementNS(page, ns, localName,
                namedNodeMapToSaxAttributes(source.getAttributes(), attributesOrderMap, source));
    }
    final NamedNodeMap nodeAttributes = source.getAttributes();
    if (page != null && page.isHtmlPage()) {
        localName = localName.toUpperCase(Locale.ROOT);
    }
    final String qualifiedName;
    if (source.getPrefix() == null) {
        qualifiedName = localName;
    }
    else {
        qualifiedName = source.getPrefix() + ':' + localName;
    }

    final String namespaceURI = source.getNamespaceURI();
    if (HTMLParser.SVG_NAMESPACE.equals(namespaceURI)) {
        return HTMLParser.SVG_FACTORY.createElementNS(page, namespaceURI, qualifiedName,
                namedNodeMapToSaxAttributes(nodeAttributes, attributesOrderMap, source));
    }

    final Map<String, DomAttr> attributes = new LinkedHashMap<>();
    for (int i = 0; i < nodeAttributes.getLength(); i++) {
        final int orderedIndex = getIndex(nodeAttributes, attributesOrderMap, source, i);
        final Attr attribute = (Attr) nodeAttributes.item(orderedIndex);
        final String attributeNamespaceURI = attribute.getNamespaceURI();
        final String attributeQualifiedName;
        if (attribute.getPrefix() != null) {
            attributeQualifiedName = attribute.getPrefix() + ':' + attribute.getLocalName();
        }
        else {
            attributeQualifiedName = attribute.getLocalName();
        }
        final String value = attribute.getNodeValue();
        final boolean specified = attribute.getSpecified();
        final DomAttr xmlAttribute =
                new DomAttr(page, attributeNamespaceURI, attributeQualifiedName, value, specified);
        attributes.put(attribute.getNodeName(), xmlAttribute);
    }
    return new DomElement(namespaceURI, qualifiedName, page, attributes);
}
 
Example #27
Source File: SchemaDOMImplementation.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId)
        throws DOMException {
    throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
}
 
Example #28
Source File: HtmlPage.java    From htmlunit with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void setDocumentType(final DocumentType type) {
    super.setDocumentType(type);
}
 
Example #29
Source File: DTMNodeProxy.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 *
 *
 * @see org.w3c.dom.Document
 */
@Override
public final DocumentType getDoctype()
{
  return null;
}
 
Example #30
Source File: XmlPage.java    From htmlunit with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void setDocumentType(final DocumentType type) {
    super.setDocumentType(type);
}