当前位置:网站首页>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>
边栏推荐
- 一起上水硕系列】Day 9
- Training method of grasping angle in grasping detection
- 大学校园IP网络广播-厂家基于校园局域网的大学校园IP广播方案设计指南
- "C and pointer" - Chapter 13 function pointer 1: callback function 2 (combined with template to simplify code)
- Go practice -- use redis in golang (redis and go redis / redis)
- Source insight operation manual installation trial
- Disassembly and installation of Lenovo r7000 graphics card
- Go practice -- generate and read QR codes in golang (skip2 / go QRcode and boombuilder / barcode)
- Progressive multi grasp detection using grasp path for rgbd images
- NG Textarea-auto-resize
猜你喜欢

Map的扩容机制

Skip table: principle introduction, advantages and disadvantages of skiplist

Communication - how to be a good listener?

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

大二困局(复盘)

Yolov5 network structure + code + application details | CSDN creation punch in

@Solutions to null pointer error caused by Autowired

XML配置文件

"C and pointer" - Chapter 13 function pointer 1: callback function 2 (combined with template to simplify code)

Final review (Day5)
随机推荐
2022.7.2day594
ninja: build stopped: subcommand failed.
Make your own dataset
Final review (Day7)
聊聊如何利用p6spy进行sql监控
今天很多 CTO 都是被干掉的,因为他没有成就业务
SimpleITK学习笔记
Explanation of several points needing attention in final (tested by the author)
Principles of BTC cryptography
6.23星期四库作业
Technical analysis of qianyuantong multi card aggregation router
期末复习(DAY6)
Win10 install pytullet and test
Redis 入门和数据类型讲解
2022.7.2day594
Redis Introduction et explication des types de données
Jetson AGX Orin 平台移植ar0233-gw5200-max9295相机驱动
"C and pointer" - Chapter 13 function pointer 1: callback function 2 (combined with template to simplify code)
Why should we rewrite hashcode when we rewrite the equals method?
Get and monitor remote server logs




