当前位置:网站首页>xml学习笔记
xml学习笔记
2022-06-27 00:05:00 【zfoo-framework】
1)xml: 可扩展标记语言 Extensible markup language
2)可扩展的含义: 标签都是自定义的,比如可以有 <user> <student>。而html标签都是别人的。
3)功能: xml和html有一个共同的爹:w3c(万维网联盟)
html是松散的语言,xml的出现是为了代替html,但是没有功能的提升,最终没有获胜。
接着和properties竞争:
name=zhangsan
age=23
gender=nan
xml阅读方便,清晰,它找到了自己的发展方向:不再是展示数据,而是存储数据(配置文件、在网络中传输)
<user id='1'>
<name>zhangsan</name>
<age>23</age>
<gender>nan</gender>
</user>
4)对比:
xml标签是自定义,html标签是预定义好的。
xml语法严格,html语法松散。
xml是存储数据,html是展示数据。
5)文档声明
6)xml也是有解析引擎,拖到浏览器中不报错,则就:正确的。
7)谁编写xml?
谁解析xml?
说明(约束)文档:规定了xml文档的书写规则。
8)约束技术:
最原始的是dtd:一种简单的约束,缺点是:无法约束内容。
schema: 后缀是xsd。
xsd:sequence // 按顺序出现
xsd:complexType //
9)xml解析
dom:将xml一次性加载到内存中,形成dom树。
优点:操作方便,可以对文档进行CRUD操作。
缺点:1M的文档,一次性加载进来,可能1000~1W M左右。 因此十分占用内存。
SAX: 逐行读取,基于事件驱动。读一行,就释放一行,内存中只有一行。
优点:基本不占用内存。
缺点:只能读取。
10)xml常见的解析器
jaxp:sun公司提供的支持dom和sax,很慢。
dom4j: 一款优秀的,常用于解析器。
jsoup: 常用于解析html。
pull:android内置的解析器。sax方式。
边栏推荐
- Using physical information neural network to solve hydrodynamics equations
- The fourth bullet of redis interview eight part essay (end)
- 05 | 规范设计(下):commit 信息风格迥异、难以阅读,如何规范?
- Moher College -x-forwarded-for injection vulnerability practice
- 目前哪个证券公司炒股开户是最好最安全的?
- test
- Simulation of delta variant strain of novel coronavirus (mindsponge application)
- Competition Registration | one of the key ai+ scientific computing competitions - China open source scientific software creativity competition, competing for 100000 bonus!
- No clue about complex data?
- com. fasterxml. jackson. databind. exc.MismatchedInputException: Expected array or string. at [Source:x
猜你喜欢

基于SSMP的宠物医院管理系统

The most complete hybrid precision training principle in the whole network
![[UVM actual battle== > episode_3] ~ assertion, sequence, property](/img/78/7ce3a9a4e933a58f90478be53e6e61.png)
[UVM actual battle== > episode_3] ~ assertion, sequence, property
![Cve-2022-30190 follina office rce analysis [attached with customized word template POC]](/img/69/8f0381e99655009159c5119c7b896f.png)
Cve-2022-30190 follina office rce analysis [attached with customized word template POC]

【Mysql】时间字段默认设置为当前时间

新型冠状病毒变异Delta毒株的模拟(MindSPONGE应用)

Lwip之ARP模块实现

Amway! How to provide high-quality issue? That's what Xueba wrote!

Analysis on the advantages and disadvantages of the best 12 project management systems at home and abroad

MATLAB data type - character type
随机推荐
不会写免杀也能轻松过defender上线CS
matlab数据类型 —— 字符型
网络中的网络(套娃)
泰国安全又划算的支付方式
Installation of xshell and xftp
Safe and cost-effective payment in Thailand
Oracle 數據庫基本知識概念
com. fasterxml. jackson. databind. exc.MismatchedInputException: Expected array or string. at [Source:x
Mindspire, a domestic framework, cooperates with Shanshui nature conservation center to find and protect the treasure life in the "China water tower"
如何写好测试用例以及go单元测试工具testify简单介绍
Lwip之定时机制
Redis detailed tutorial
Alibaba cloud server purchase, basic configuration, (xshell) remote connection and environment building
The most complete hybrid precision training principle in the whole network
find_circ详细使用指南
运用物理信息神经网络求解流体力学方程
Can't write to avoid killing and can easily go online CS through defender
com.fasterxml.jackson.databind.exc.MismatchedInputException: Expected array or string. at [Source:x
From bitmap to bloom filter, C # implementation
Great health industry annual must attend event, 2022 Shandong International Great Health Industry Expo