zoukankan      html  css  js  c++  java
  • 如何写一个dtd文件

    class.dtd

    <?xml version="1.0" encoding="UTF-8"?>
    <!ELEMENT classrooms (classroom+)>
    <!ELEMENT classroom (grade,classname,students)>
    <!ATTLIST classroom id  ID #REQUIRED>
    <!ELEMENT classname (#PCDATA)>
    <!ELEMENT grade (#PCDATA)>
    <!ELEMENT students (student+)>
    <!ELEMENT student (id,studentname,age)>
    <!ELEMENT id (#PCDATA)>
    <!ELEMENT studentname (#PCDATA)>
    <!ELEMENT age (#PCDATA)>

    class.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE classrooms SYSTEM "class.dtd">
    <classrooms>
        <classroom id="c1">
            <grade>2010</grade>
            <classname>10级计算机应用技术一班</classname>
            <students>
                <student>
                    <id>1</id>
                    <studentname>宋发准</studentname>
                    <age>12</age>
                </student>
                <student>
                    <id>1</id>
                    <studentname>宋发准</studentname>
                    <age>12</age>
                </student>
            </students>
        </classroom>
        <classroom id="c2">
            <grade>2010</grade>
            <classname>10级计算机应用技术二班</classname>
            <students>
                <student>
                    <id>2</id>
                    <studentname>李四</studentname>
                    <age>22</age>
                </student>
                <student>
                    <id>2</id>
                    <studentname>李四</studentname>
                    <age>22</age>
                </student>
            </students>
        </classroom>
    </classrooms>

    ?=0次或者1次,+=一次或者多次,*=0次或者多次

  • 相关阅读:
    springboot雷神更新
    JVM整理文档
    这是我见过BIO/NIO/AIO讲的最清楚的博客了
    redis主从机制
    mybatis是如何防止sql注入的
    分布式锁的实现方式简介
    Nginx简介
    .net 下的集合
    C#模拟百度登录
    WPF 将PPT,Word转成图片
  • 原文地址:https://www.cnblogs.com/songfahzun/p/5885589.html
Copyright © 2011-2022 走看看