Download Fore_End/XML/src/cn/itcast/xml/schema/student2.xml from zxy0307/JavaWeb: direct link, hf CLI and curl.
- Browser
- Download file 681 Bytes
-
https://huggingface.co/zxy0307/JavaWeb/resolve/main/Fore_End/XML/src/cn/itcast/xml/schema/student2.xml
- Command line
-
hf download hf://zxy0307/JavaWeb/Fore_End/XML/src/cn/itcast/xml/schema/student2.xml
-
curl -L -o student2.xml https://huggingface.co/zxy0307/JavaWeb/resolve/main/Fore_End/XML/src/cn/itcast/xml/schema/student2.xml
681 Bytes
| <!-- | |
| schema可以约束标签内的具体内容,引入xsd步骤: | |
| 1.填写xml文档的根元素 | |
| 2.引入xsi前缀. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 3.引入xsd文件命名空间. xsi:schemaLocation="http://www.itcast.cn/xml student.xsd" | |
| 4.为每一个xsd约束声明一个前缀,作为标识 xmlns="http://www.itcast.cn/xml" | |
| --> | |
| <students xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns="http://www.itcast.cn/xml" | |
| xsi:schemaLocation="http://www.itcast.cn/xml student.xsd" | |
| > | |
| <student number="heima_0001"> | |
| <name>tom</name> | |
| <age>18</age> | |
| <sex>male</sex> | |
| </student> | |
| </students> |