当前位置:网站首页>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>
边栏推荐
- Mapbox tasting value cloud animation
- Why is go language particularly popular in China
- Yolov5 input (II) | CSDN creative punch in
- 微服务常见面试题
- Redis使用Lua脚本简介
- Source insight automatic installation and licensing
- 乾元通多卡聚合路由器的技术解析
- 6.23 warehouse operation on Thursday
- The IntelliJ platform completely disables the log4j component
- Communication - how to be a good listener?
猜你喜欢
【一起上水硕系列】Day 7 内容+Day8
Export the altaro event log to a text file
(perfect solution) how to set the position of Matplotlib legend freely
Win10 install pytullet and test
Skip table: principle introduction, advantages and disadvantages of skiplist
乾元通多卡聚合路由器的技术解析
Primary school campus IP network broadcasting - Design of primary school IP digital broadcasting system based on campus LAN
Webrtc protocol introduction -- an article to understand ice, stun, NAT, turn
DEX net 2.0 for crawl detection
XML Configuration File
随机推荐
期末复习(day3)
Altaro virtual machine replication failed: "unsupported file type vmgs"
ansible防火墙firewalld设置
[untitled]
今天很多 CTO 都是被幹掉的,因為他沒有成就業務
(完美解决)matplotlib图例(legend)如何自由设置其位置
Final review (Day5)
Apache+PHP+MySQL环境搭建超详细!!!
ninja: build stopped: subcommand failed.
Deploy crawl detection network using tensorrt (I)
How do I migrate my altaro VM backup configuration to another machine?
Brief introduction of realsense d435i imaging principle
Altaro set grandfather parent child (GFS) archiving
Final review (Day7)
【无标题】
"C and pointer" - Chapter 13 function of function pointer 1 - callback function 1
Obtenir et surveiller les journaux du serveur distant
獲取並監控遠程服務器日志
@Autowired 导致空指针报错 解决方式
2022.DAY592