KS X 6047-5-2011 Document Object Model(DOM) level 2 traversal and range《文档对象模型(DOM)级别2遍历和范围》.pdf

上传人:eastlab115 文档编号:821625 上传时间:2019-02-11 格式:PDF 页数:66 大小:567.37KB
下载 相关 举报
KS X 6047-5-2011 Document Object Model(DOM) level 2 traversal and range《文档对象模型(DOM)级别2遍历和范围》.pdf_第1页
第1页 / 共66页
KS X 6047-5-2011 Document Object Model(DOM) level 2 traversal and range《文档对象模型(DOM)级别2遍历和范围》.pdf_第2页
第2页 / 共66页
KS X 6047-5-2011 Document Object Model(DOM) level 2 traversal and range《文档对象模型(DOM)级别2遍历和范围》.pdf_第3页
第3页 / 共66页
KS X 6047-5-2011 Document Object Model(DOM) level 2 traversal and range《文档对象模型(DOM)级别2遍历和范围》.pdf_第4页
第4页 / 共66页
KS X 6047-5-2011 Document Object Model(DOM) level 2 traversal and range《文档对象模型(DOM)级别2遍历和范围》.pdf_第5页
第5页 / 共66页
点击查看更多>>
资源描述

1、 KSKSKSKSKSKSKSK KSKSKS KSKSK KSKS KSK KS KS X 6047 5 (DOM) 2 KS X 6047 5:2011 2011 12 30 http:/www.kats.go.krKS X 6047 5:2011 :e- ( ) ( ) () () ( ) : () () DRM ( ) KS X 6047 5:2011 : (http:/www.standard.go.kr) : :2011 12 30 2011-0689 : e- : ( 02-509-7262) (http:/www.kats.go.kr). 10 5 , . KS X 6047

2、5:2011 i ii iii 1 1 2 1 3 .1 3.1 .1 3.2 11 4 .19 4.1 .19 4.2 20 4.3 Range .22 4.4 Range .22 4.5 Range .23 4.6 Range .24 4.7 (contents) 25 4.8 25 4.9 26 4.10 26 4.11 27 4.12 Range .27 4.13 Range .29 A( ) IDL 39 A.1 .39 A.2 .41 B( ) 44 B.1 Document Object Model Traversal.44 B.2 .46 C( ) ECMAScripts .4

3、9 C.1 .49 C.2 Document Model Range.51 KS X 6047 5:2011 .55 KS X 6047 5:2011 ii . , , . , , . DOM . DOM XML HTML programmatic interface , . DOM Level 2 . DOM Level 2 Core DOM Level 2 Views DOM Level 2 Events DOM Level 2 Style DOM Level 2 Traversal and Range DOM Level 2 HTML DOM Level 2 Traversal and

4、Range . KS X 6047 5:2011 iii World Wide Web Consortium(W3C) 2000 Document Object Model(DOM) Level 2 Traversal and Range Specificaton 1.0 , . DOM Level 2 Traversal and Range (Traversal) . TreeWalker, Node , NodeFilter API , XML DOM DOM . KS X 6047 5:2011 (DOM) 2 Document Object Model(DOM) level 2 tra

5、versal and range 1 DOM 2 . 2 . . 3 3.1 DOM 2 (Traversal) . TreeWalker, Node , NodeFilter . . DOM DOMImplementation “Traversal” “2.0” hasFeature(feature, version) . , DOM 2 Core DOM 2 Core “Core” . DOM 2 Core DOM 2 Core . Node s TreeWalkersTreeWalkers . Node s , . , ( ) , . , TreeWalker . TreeWalker

6、, Node s . Node s TreeWalkersTreeWalkers . . TreeWalker , NodeFilter . , . KS X 6047 5:2011 2 Node s TreeWalkersTreeWalkers . , . . Node s . TreeWalkers , . . 3.1.1 NodeIterators Node . DOM . , nextnode() . . Node , . , nextNode() null . Node DocumentTraversal createNode . Node . OR . . . NodeIterat

7、or iter= (DocumentTraversal)document). createNodeIterator( root, NodeFilter.SHOW_ELEMENT, null); while (Node n = iter.nextNode() printMe(n); 3.1.1.1 NodeIterators . Iterator , , . Iterator , . Iterator , * . A B C D E F G H I nextNode() . , , nextNode() “A” . A * B C D E F G H I Node s . , , . . pre

8、viousNode() . , A B Node s A . KS X 6047 5:2011 3 A B C D E F G H I nextNode() previousNode() , null . Node . A B C D E F G H I 3.1.1.2 . Node . , Node detach() . , . . , Node . , , . . A B C D * E F G H I , E . . A B C D * F G H I , Node D F F . A B C D * X F G H I . I X . A B C D * I X F G H , . N

9、ode nextnode() , . D . A B C D * F G H I Node , C . A B C * F G H I Node previousNode() , . E . KS X 6047 5:2011 4 A B C D * E F G H I Node , F . A B C D * F G H I , . D . A B C D * F G H I C . A B C * F G H I D , . C . A B * C , Node , C . previousnode() . , . A B * Node , . , C D, E, F C . A B C D

10、 * E F G H I D . A B * G H I D , Node . 3.1.1.3 , Node . whatToShow , nextnode() “ ” . NodeFilter , . , . , null . . previousNode() . KS X 6047 5:2011 5 , . , . A B * c d E F G Nextnode() E . A B c d E * F G , . E . A B c d * F G X d . A B c X d * F G previousNode() X . , . E , d B previousNode() X

11、. 3.1.2 NodeFilters NodeFilters . , . NodeFilter Node TreeWalker . , . NodeFilters . Node . DOM . , NodeFilters . . , TreeWalkers TreeWalkers TreeWalkers . NodeFilter ( , ) , . , FILTER_SHOW FILTER_SKIP TreeWalker , . NodeFilters . 3.1.2.1 NodeFilters NodeFilter acceptNode() , Node TreeWalker NodeKS

12、 X 6047 5:2011 6 . acceptNode() Node . acceptNode() FILTER_ ACCEPT Node . FILTER_SKIP Node Node . FILTER_REJECT Node . , FILTER_REJECT FILTER_SKIP Node s . HTML anchors . HTML HTEF NAME A . anchor JAVA NodeFilter . class NamedAnchorFilter implements NodeFilter short acceptNode(Node n) if (n.getNodeT

13、ype()=Node.ELEMENT_NODE) Element e = (Element)n; if (! e.getNodeName().equals(“A“) return FILTER_SKIP; if (e.getAttributeNode(“NAME“) != null) return FILTER_ACCEPT; return FILTER_SKIP; NodeFilter Node s , FILTER_SKIP FILTER_REJECT , . TreeWalker , FILTER_REJECT anchor ( ) , anchor anchor . FILTER_SK

14、IP . Node TreeWalker . , NodeFilter Node . NamedAnchorFilter myFilter = new NamedAnchorFilter(); NodeIterator iter= (DocumentTraversal)document).createNode( node, NodeFilter.SHOW_ELEMENT, myFilter); NodeFilter nodeType , SHOW_ELEMENT . , whatToShow SHOW_ELEMENT . nodeType , Elements, ATTRs, Processi

15、ngInstructions whatToShow . 3.1.2.2 NodeFilters NodeFilter . KS X 6047 5:2011 7 DOM . TreeWalker Node , . NodeFilter . Node .nextNode() Node .previousNode() TreeWalker .firstChild() TreeWalker .lastChild() TreeWalker .nextSibling() TreeWalker .previousSibling() TreeWalker .nextNode() TreeWalker .pre

16、viousNode() TreeWalker .parentNode() 3.1.2.3 NodeFilters NodeFilters . DOM . . , NodeFilter , Node TreeWalker . , NodeFilters . . 3.1.2.4 NodeFilters whatToShow Node TreeWalker whatToShow . whatToShow NodeFilter . FILTER_SKIP . . , skipNodeFilter . whatToShow SHOW_ALL , nodeType . 3.1.3 TreeWalker T

17、reeWalker Node . TreeWalker . , TreeWalker . TreeWalker . , , . processMe(Node n) nodeStartActions(n); for (Node child=n.firstChild(); KS X 6047 5:2011 8 child != null; child=child.nextSibling() processMe(child); nodeEndActions(n); TreeWalker , . TreeWalker . currentNode / TreeWalker . TreeWalker . processMe(TreeWalker tw) Node n = tw.getCurrentNode(); nodeStartActions(tw); for (Node child=tw.firstChild(); child!=null; child=tw.nextSibling() processMe(tw); tw.setCurrentNode(n); nodeEndActions(tw); Node TreeWalker TreeWalker . ProcssingInstructions . EntityReference . , NodeFilters . .

展开阅读全文
相关资源
猜你喜欢
  • ASTM F1468-2004a(2018) Standard Practice for Evaluation of Metallic Weapons Detectors for Controlled Access Search and Screening.pdf ASTM F1468-2004a(2018) Standard Practice for Evaluation of Metallic Weapons Detectors for Controlled Access Search and Screening.pdf
  • ASTM F1469-1999(2004) Standard Guide for Conducting a Repeatability and Reproducibility Study on Test Equipment for Nondestructive Testing《无损检验用测试设备运行的重复性和再生性研究》.pdf ASTM F1469-1999(2004) Standard Guide for Conducting a Repeatability and Reproducibility Study on Test Equipment for Nondestructive Testing《无损检验用测试设备运行的重复性和再生性研究》.pdf
  • ASTM F1469-1999(2010) Standard Guide for Conducting a Repeatability and Reproducibility Study on Test Equipment for Nondestructive Testing《无损检验用测试设备运行的重复性和再生性研究的标准指南》.pdf ASTM F1469-1999(2010) Standard Guide for Conducting a Repeatability and Reproducibility Study on Test Equipment for Nondestructive Testing《无损检验用测试设备运行的重复性和再生性研究的标准指南》.pdf
  • ASTM F1470-2002 Standard Guide for Fastener Sampling for Specified Mechanical Properties and Performance Inspection《特定的机械性能和功能检测用紧固件抽样的标准指南》.pdf ASTM F1470-2002 Standard Guide for Fastener Sampling for Specified Mechanical Properties and Performance Inspection《特定的机械性能和功能检测用紧固件抽样的标准指南》.pdf
  • ASTM F1470-2009 Standard Practice for Fastener Sampling for Specified Mechanical Properties and Performance Inspection《特定的机械性能和功能检测用坚固件抽样的标准指南》.pdf ASTM F1470-2009 Standard Practice for Fastener Sampling for Specified Mechanical Properties and Performance Inspection《特定的机械性能和功能检测用坚固件抽样的标准指南》.pdf
  • ASTM F1470-2012 Standard Practice for Fastener Sampling for Specified Mechanical Properties and Performance Inspection《特定的机械性能和功能检测用坚固件抽样的标准指南》.pdf ASTM F1470-2012 Standard Practice for Fastener Sampling for Specified Mechanical Properties and Performance Inspection《特定的机械性能和功能检测用坚固件抽样的标准指南》.pdf
  • ASTM F1470-2018 Standard Practice for Fastener Sampling for Specified Mechanical Properties and Performance Inspection《规定的机械性能和性能检验用紧固件取样的标准实施规程》.pdf ASTM F1470-2018 Standard Practice for Fastener Sampling for Specified Mechanical Properties and Performance Inspection《规定的机械性能和性能检验用紧固件取样的标准实施规程》.pdf
  • ASTM F1471-1993(2001) Standard Test Method for Air Cleaning Performance of a High-Efficiency Particulate Air- Filter System《高效粒子空气过滤器系统空气净化功能的试验方法》.pdf ASTM F1471-1993(2001) Standard Test Method for Air Cleaning Performance of a High-Efficiency Particulate Air- Filter System《高效粒子空气过滤器系统空气净化功能的试验方法》.pdf
  • ASTM F1472-2002a Standard Specification for Wrought Titanium -6Aluminum -4Vanadium Alloy for Surgical Implant Applications (UNS R56400)《外科植入设备用锻制钛-6铝-4钒合金的标准规范》.pdf ASTM F1472-2002a Standard Specification for Wrought Titanium -6Aluminum -4Vanadium Alloy for Surgical Implant Applications (UNS R56400)《外科植入设备用锻制钛-6铝-4钒合金的标准规范》.pdf
  • 相关搜索

    当前位置:首页 > 标准规范 > 国际标准 > 其他

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1