当前位置:网站首页>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
边栏推荐
- Jerry's watch reads the file through the file name [chapter]
- 2022 Summer Project Training (II)
- 阿里云国际版ECS云服务器无法登录宝塔面板控制台
- std::true_type和std::false_type
- 78 year old professor Huake has been chasing dreams for 40 years, and the domestic database reaches dreams to sprint for IPO
- 30 minutes to understand PCA principal component analysis
- 最新财报发布+天猫618双榜第一,耐克蓄力领跑下个50年
- 30 分钟看懂 PCA 主成分分析
- 模板于泛型编程之declval
- 推荐好用的后台管理脚手架,人人开源
猜你喜欢

1700C - Helping the Nature

關於這次通信故障,我想多說幾句…
![[the 300th weekly match of leetcode]](/img/a7/16b491656863e2c423ff657ac6e9c5.png)
[the 300th weekly match of leetcode]

Why does wechat use SQLite to save chat records?

Self-supervised Heterogeneous Graph Neural Network with Co-contrastive Learning 论文阅读

Easy to use PDF to SVG program

Splay

Declval (example of return value of guidance function)

Maixll dock camera usage

推荐好用的后台管理脚手架,人人开源
随机推荐
Why does wechat use SQLite to save chat records?
Recursive way
Wchars, coding, standards and portability - wchars, encodings, standards and portability
Jerry's updated equipment resource document [chapter]
The latest financial report release + tmall 618 double top, Nike energy leads the next 50 years
Grafana 9.0 is officially released! It's the strongest!
HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
2022 Summer Project Training (I)
复现Thinkphp 2.x 任意代码执行漏洞
Release of the sample chapter of "uncover the secrets of asp.net core 6 framework" [200 pages /5 chapters]
Cocos2d Lua 越来越小样本 内存游戏
Interview shock 62: what are the precautions for group by?
F200 - UAV equipped with domestic open source flight control system based on Model Design
I want to say more about this communication failure
2022暑期项目实训(二)
Recommend easy-to-use backstage management scaffolding, everyone open source
Declval (example of return value of guidance function)
Tree-LSTM的一些理解以及DGL代码实现
J'aimerais dire quelques mots de plus sur ce problème de communication...
Jerry's watch deletes the existing dial file [chapter]