当前位置:网站首页>Configure DTD of XML file
Configure DTD of XML file
2022-07-03 05:36:00 【Nara Senyu】
Catalog
5. The standard XML The format of :
1. There is and only one root element , On the way
5. Legal tag name used , In the picture action and forward It's the tag name
1. understand dtd Mind maps
2.XML What is it? ?
- XML Extensible markup language (EXtensible Markup Language)
- XML It's a markup language , similar HTML
- XML The purpose of the design is To transmit data , Instead of displaying data
- XML The label is not predefined . You need to define your own tags .
- XML Designed to be self-descriptive .
- XML yes W3C The recommended standard of
3.XML The role of :
Not just configuration , And for cross language data interaction
4. Why study XML
stay XML In language , It allows users to customize tags . A label is used to describe a piece of data ; A tag can be divided into start tag and end tag , Between the start tag and the end tag , You can also use other tags to describe other data , So as to realize the description of data relationship .
5. The standard XML The format of :
1. There is and only one root element , On the way <!DOCTYPE root[]>
2.XML Label case sensitive , For example “filter” and “Filter”、“listener” and “Listener” It's not the same thing , So different
3. Use the end tag correctly , In the picture <config></config> There is a beginning , Existing end . for instance : Be similar to HTML Double label
4. Nesting labels correctly , In the figure config It's nested in action,action It's nested in forward
5. Legal tag name used , In the picture action and forward It's the tag name ,path and type This is the property
6. Define valid properties
6. Two examples :
In the picture above root Namely config
element-name Is nested relationship ,
Like config yes dtd The head of the ,config There are two aciton,action There are two forward
<?xml version="1.0" encoding="UTF-8"?> <!-- config label : Can contain 0~N individual action label --> <!DOCTYPE config[ <!ELEMENT config (action*)> <!ELEMENT ation (forward*)> <!ATTLIST action path CDATA #REQUIRED type CDATA #REQUIRED > <!ATTLIST forward name CDATA #REQUIRED path CDATA #REQUIRED redirect (true|false) 'true' > ]> <config> <!-- action label : Can be full of 0~N individual forward label path: With / Starting string , And the value must be unique Non empty , The path corresponding to the sub controller type: character string , Non empty , The full class name of the sub controller --> <action path="/registerAction" type="test.action.RegisterAction"> <forward name="success" path="/index.jsp" redirect="true" /> <forward name="failed" path="/register.jsp" redirect="false" /> </action> <action path="/loginAction" type="test.action.LoginAction"> <forward name="a" path="/index.jsp" redirect="false" /> <forward name="b" path="/welcome.jsp" redirect="true" /> </action> </config>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE persons[ <!ELEMENT persons (person+)> <!ELEMENT person (name,age,contact,br*)> <!ELEMENT name (#PCDATA)> <!ELEMENT age (#PCDATA)> <!ELEMENT contact (phone|email)> <!ELEMENT br EMPTY> <!ATTLIST person pid ID #REQUIRED sex ( male | Woman ) ' male ' qq CDATA #IMPLIED parent IDREF #IMPLIED > ]> <persons> <person pid="p1" sex=" male " qq="aaa" parent="p2"> <name> Zhang Xiaoming </name> <age>10</age> <contact> <phone>1234567</phone> </contact> <br/> </person> <person pid="p2"> <name> Zhang Daming </name> <age>35</age> <contact> <email>[email protected]</email> </contact> </person> </persons>
边栏推荐
- Yolov5 model construction source code details | CSDN creation punch in
- Congratulations to musk and NADELLA on their election as academicians of the American Academy of engineering, and Zhang Hongjiang and Fang daining on their election as foreign academicians
- Win10 install pytullet and test
- Go practice - gorilla / handlers used by gorilla web Toolkit
- mysql启动报错:The server quit without updating PID file几种解决办法
- ansible防火墙firewalld设置
- Covering Safari and edge, almost all mainstream browsers have realized webgl 2.0 support
- Talk about how to use p6spy for SQL monitoring
- Basic introduction of redis and explanation of eight types and transactions
- SimpleITK学习笔记
猜你喜欢

Intégration profonde et alignement des séquences de protéines Google

@Solutions to null pointer error caused by Autowired

配置xml文件的dtd

Congratulations to musk and NADELLA on their election as academicians of the American Academy of engineering, and Zhang Hongjiang and Fang daining on their election as foreign academicians

Deep embedding and alignment of Google | protein sequences

How to use source insight

Beaucoup de CTO ont été tués aujourd'hui parce qu'il n'a pas fait d'affaires
![[set theory] relational closure (relational closure related theorem)](/img/6a/b6dca7abf592f8d8ab1d6aecc43381.jpg)
[set theory] relational closure (relational closure related theorem)

Redis使用Lua脚本简介

今天很多 CTO 都是被干掉的,因为他没有成就业务
随机推荐
Why is go language particularly popular in China
Covering Safari and edge, almost all mainstream browsers have realized webgl 2.0 support
一起上水硕系列】Day 9
Brief introduction of realsense d435i imaging principle
Sophomore dilemma (resumption)
Source insight automatic installation and licensing
College campus IP network broadcasting - manufacturer's design guide for college campus IP broadcasting scheme based on campus LAN
Explanation of several points needing attention in final (tested by the author)
Go practice -- use redis in golang (redis and go redis / redis)
ES7 easy mistakes in index creation
联想R7000显卡的拆卸与安装
Make your own dataset
Introduction to rust Foundation (basic type)
DEX net 2.0 for crawl detection
Basic introduction of redis and explanation of eight types and transactions
[untitled]
Differences among bio, NiO and AIO
2022.7.2day594
NG Textarea-auto-resize
Redis 入門和數據類型講解



