当前位置:网站首页>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 updated equipment resource document [chapter]
- Prophet模型的简介以及案例分析
- DNS hijacking
- Jerry's access to additional information on the dial [article]
- Top command details
- 2019 Alibaba cluster dataset Usage Summary
- Penetration test information collection - CDN bypass
- POJ 2208 已知边四面体六个长度,计算体积
- Codeforces Round #803 (Div. 2)
- DOM简要
猜你喜欢
44所高校入选!分布式智能计算项目名单公示
Maixll-Dock 摄像头使用
Four processes of program operation
[swoole series 2.1] run the swoole first
Ms-tct: INRIA & SBU proposed a multi-scale time transformer for motion detection. The effect is SOTA! Open source! (CVPR2022)...
Implementation of queue
SAP Fiori 应用索引大全工具和 SAP Fiori Tools 的使用介绍
使用cpolar建立一个商业网站(1)
Distiller les connaissances du modèle interactif! L'Université de technologie de Chine & meituan propose Virt, qui a à la fois l'efficacité du modèle à deux tours et la performance du modèle interacti
Jerry is the custom background specified by the currently used dial enable [chapter]
随机推荐
Five data structures of redis
C language exchanges two numbers through pointers
二分(整数二分、实数二分)
I want to say more about this communication failure
Ms-tct: INRIA & SBU proposed a multi-scale time transformer for motion detection. The effect is SOTA! Open source! (CVPR2022)...
HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
Shangsilicon Valley JUC high concurrency programming learning notes (3) multi thread lock
【LeetCode第 300 场周赛】
F200 - UAV equipped with domestic open source flight control system based on Model Design
d绑定函数
Virtual machine VirtualBox and vagrant installation
Why does wechat use SQLite to save chat records?
Distiller les connaissances du modèle interactif! L'Université de technologie de Chine & meituan propose Virt, qui a à la fois l'efficacité du modèle à deux tours et la performance du modèle interacti
TCP packet sticking problem
Coco2017 dataset usage (brief introduction)
测试1234
1700C - Helping the Nature
最新财报发布+天猫618双榜第一,耐克蓄力领跑下个50年
MSF horizontal MSF port forwarding + routing table +socks5+proxychains
Alibaba cloud international ECS cannot log in to the pagoda panel console