package org.w3c.domts.level2.core;
import org.w3c.dom.*;
import org.w3c.domts.DOMTestCase;
import org.w3c.domts.DOMTestDocumentBuilderFactory;
/**
* The "getOwnerDocument()" method returns null if the target
* node itself is a DocumentType which is not used with any document yet.
*
* Invoke the "getOwnerDocument()" method on the master
* document. The DocumentType returned should be null.
* @author NIST
* @author Mary Brady
* @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/core#node-ownerDoc">http://www.w3.org/TR/DOM-Level-2-Core/core#node-ownerDoc</a>
*/
public final class ownerDocument01 extends DOMTestCase {
/**
* Constructor.
* @param factory document factory, may not be null
* @throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
*/
public ownerDocument01(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException {
super(factory);
//
// check if loaded documents are supported for content type
//
String contentType = getContentType();
preload(contentType, "staff", false);
}
/**
* Runs the test case.
* @throws Throwable Any uncaught exception causes test to fail
*/
public void runTest() throws Throwable {
Document doc;
DocumentType ownerDocument;
doc = (Document) load("staff", false);
ownerDocument = (DocumentType) doc.getOwnerDocument();
assertNull("throw_Null", ownerDocument);
}
/**
* Gets URI that identifies the test.
* @return uri identifier of test
*/
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/ownerDocument01";
}
/**
* Runs this test from the command line.
* @param args command line arguments
*/
public static void main(final String[] args) {
DOMTestCase.doMain(ownerDocument01.class, args);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
ownerDocument01.rar_Not Yet
共1个文件
c:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 65 浏览量
2022-09-20
21:25:35
上传
评论
收藏 924B RAR 举报
温馨提示
The "getOwnerDocument()" method returns null if the target node itself is a DocumentType which is not used with any document yet.
资源详情
资源评论
资源推荐
收起资源包目录
ownerDocument01.rar (1个子文件)
ownerDocument01.c 2KB
共 1 条
- 1
我虽横行却不霸道
- 粉丝: 72
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0