当前位置:网站首页>DOM Brief
DOM Brief
2022-07-06 18:25:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack .
Looking at Js I feel like when I watch the video Dom It's amazing . In this user experience oriented Web In the age of design .Dom Is crucial .
It's easy to use . And traversal is simple . Support XPath.
Since it is so powerful, let's give a brief introduction Dom This east east .
One 、DOM What is it? ?
DOM namely : Document object model (DocumentObject Model).DOM It's a programming interface . Is aimed at HTML file 、XML And other documents API. Is similar to the JDBC It is a set for database API equally .
Two 、DOM What for? ?
DOM It is used to access or operate HTML file 、XHTML file 、XML Node elements in the document .
Now almost all browsers are running W3C released DOM standard , So you can use it on the browser DOM Of these API.
3、 ... and 、 When to use ?
DOM In fact, it is a programming that operates the contents contained in the document API, Developers use it to read from documents 、 Search for 、 changes 、 Add and delete data .
Four 、DOM Specify
HTML The document is a tree structure , Root is <HTML>;DOM It's also a tree structure , Root is window or document object . therefore DOM You can put HTML In the form of a tree .
5、 ... and 、DOM The classification of
The core DOM: Defines a set of standard objects that can be targeted at any document .
HTML DOM: in the light of HTML Document DOM.
XML DOM: in the light of XML Document DOM.
6、 ... and 、DOM The level of Level
DOM0: No W3C standard .
DOM1: At first it was W3C standard . Focus on HTML Documentation and XML file .
DOM2: Yes DOM1 Added style sheet object model
DOM3: Yes DOM2 Added content model (DTD 、Schemas) And document validation .
7、 ... and 、DOM Advantages and disadvantages
DOM The advantages of : Easy to use , Use DOM when , Will put all XML Document information is stored in memory . And traversal is simple , Support XPath. Enhanced ease of use .
DOM The shortcomings of : Low efficiency , Parsing speed is slow , Memory usage is too high , For large files, it is almost impossible to use . In addition, low efficiency also shows that nowadays a lot of time is consumed , Due to the use DOM When parsing , Will be for each of the documents element、attribute、processing-instrUCtion and comment Create an object , In this way DOM The creation and destruction of a large number of objects used in the mechanism will undoubtedly affect its efficiency .
summary :
The above is only true DOM The accumulation of basic knowledge , Let it have a clue in its own mind . As for how it is implemented in code , It will be added slowly in the future study .
Copyright notice : This article is an original blog article , Blog , Without consent , Shall not be reproduced .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/117406.html Link to the original text :https://javaforall.cn
边栏推荐
- Excellent open source fonts for programmers
- HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
- [.Net core] solution to error reporting due to too long request length
- 递归的方式
- Declval (example of return value of guidance function)
- 面向程序员的精品开源字体
- On time and parameter selection of asemi rectifier bridge db207
- Jerry's access to additional information on the dial [article]
- 文档编辑之markdown语法(typora)
- Grafana 9.0 is officially released! It's the strongest!
猜你喜欢
重磅硬核 | 一文聊透对象在 JVM 中的内存布局,以及内存对齐和压缩指针的原理及应用
UDP协议:因性善而简单,难免碰到“城会玩”
Implementation of queue
[Android] kotlin code writing standardization document
阿里云国际版ECS云服务器无法登录宝塔面板控制台
Easy to use PDF to SVG program
Tree-LSTM的一些理解以及DGL代码实现
Windows连接Linux上安装的Redis
Maixll-Dock 摄像头使用
从交互模型中蒸馏知识!中科大&美团提出VIRT,兼具双塔模型的效率和交互模型的性能,在文本匹配上实现性能和效率的平衡!...
随机推荐
解读云原生技术
Excellent open source fonts for programmers
使用cpolar建立一个商业网站(1)
TCP packet sticking problem
随着MapReduce job实现去加重,多种输出文件夹
MS-TCT:Inria&SBU提出用于动作检测的多尺度时间Transformer,效果SOTA!已开源!(CVPR2022)...
Unity资源顺序加载的一个方法
Compilation Principle -- C language implementation of prediction table
STM32+ENC28J60+UIP协议栈实现WEB服务器示例
MSF横向之MSF端口转发+路由表+SOCKS5+proxychains
[Android] kotlin code writing standardization document
Tree-LSTM的一些理解以及DGL代码实现
2019 Alibaba cluster dataset Usage Summary
2022 Summer Project Training (II)
关于这次通信故障,我想多说几句…
從交互模型中蒸餾知識!中科大&美團提出VIRT,兼具雙塔模型的效率和交互模型的性能,在文本匹配上實現性能和效率的平衡!...
Top command details
Reprint: defect detection technology of industrial components based on deep learning
Heavy! Ant open source trusted privacy computing framework "argot", flexible assembly of mainstream technologies, developer friendly layered design
具体说明 Flume介绍、安装和配置