当前位置:网站首页>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
边栏推荐
- 2022暑期项目实训(一)
- Jerry's watch reads the file through the file name [chapter]
- Jerry's watch reading setting status [chapter]
- 【LeetCode第 300 场周赛】
- DOM简要
- 递归的方式
- 2019 Alibaba cluster dataset Usage Summary
- 最新财报发布+天猫618双榜第一,耐克蓄力领跑下个50年
- d绑定函数
- Blue Bridge Cup real question: one question with clear code, master three codes
猜你喜欢
[.Net core] solution to error reporting due to too long request length
面向程序员的精品开源字体
【LeetCode第 300 场周赛】
当保存参数使用结构体时必备的开发技巧方式
Grafana 9.0 正式发布!堪称最强!
[Android] kotlin code writing standardization document
【Swoole系列2.1】先把Swoole跑起来
Alibaba cloud international ECS cannot log in to the pagoda panel console
Jerry is the custom background specified by the currently used dial enable [chapter]
【中山大学】考研初试复试资料分享
随机推荐
微信为什么使用 SQLite 保存聊天记录?
从交互模型中蒸馏知识!中科大&美团提出VIRT,兼具双塔模型的效率和交互模型的性能,在文本匹配上实现性能和效率的平衡!...
SQL优化问题的简述
SAP Fiori 应用索引大全工具和 SAP Fiori Tools 的使用介绍
Insert dial file of Jerry's watch [chapter]
图片缩放中心
A method of sequentially loading Unity Resources
小程序在产业互联网中的作用
UDP protocol: simple because of good nature, it is inevitable to encounter "city can play"
使用cpolar建立一个商业网站(1)
Comparative examples of C language pointers *p++, * (p++), * ++p, * (++p), (*p) + +, +(*p)
2019 Alibaba cluster dataset Usage Summary
[Android] kotlin code writing standardization document
STM32+MFRC522完成IC卡号读取、密码修改、数据读写
Windows connects redis installed on Linux
On time and parameter selection of asemi rectifier bridge db207
POJ 2208 已知边四面体六个长度,计算体积
2022 Summer Project Training (I)
STM32+HC05串口蓝牙设计简易的蓝牙音箱
2022/02/12