• JAVA xml dtd


    http://baike.baidu.com/view/147436.htm

    http://shenaodong.bokee.com/cat.11864001.html

    DTD 文档类型定义 (Document Type Definition)

    DTD 是一套关于标记符的语法规则。它是XML1.0版规格得一部分,是XML文件的验证机制,属于XML文件组成的一部分。

    DTD 是一种保证XML文档格式正确的有效方法,可以通过比较XML文档和DTD文件来看文档是否符合规范,元素和标签使用是否正确。一个DTD文档包含:元素的定义规则,元素间关系的定义规则,元素可使用的属性,可使用的实体或符号规则。

    XML文件提供应用程序一个数据交换的格式,DTD正是让XML文件能够成为数据交换的标准,因为不同的公司只需定义好标准的DTD,各公司都能够依照DTD建立XML文件,并且进行验证,如此就可以轻易的建立标准和交换数据,这样满足了网络共享和数据交互。

    DTD文件是一个ASCII的文本文件,后缀名为.dtd。

    Windows下本地DTD( Document Type Definition )应用

    project name :struts2

    project libs :

    (basic )commons-logging-1.1.jar

    (basic )freemarker-2.3.8.jar

    (basic )ognl-2.6.11.jar

    (basic )struts2-core-2.0.6.jar

    (basic )xwork-2.0.1.jar

    (plugin )struts2-spring-plugin-2.0.11.2.jar

    打开jar文件

    struts2-core-2.0.11.jar>>>> struts-2.0.dtd扒出来放入

    D:\workspace\struts2\WebRoot\WEB-INF\dtd\struts-2.0.dtd

    struts2-spring-plugin-2.0.11.2.jar>>>> struts-plugin.xml扒出来放入

    D:\workspace\struts2\WebRoot\WEB-INF\struts-plugin.xml

    将xml中:

    <!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd ">

    修改为:

    <!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "D:\workspace\struts2\WebRoot\WEB-INF\dtd\struts-2.0.dtd ">

    或:

    <!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "dtd\struts-2.0.dtd "> 

    ok 

  • 相关阅读:
    HttpClient上传文件(转)
    数据库查询结果导出到excel
    docker报错“net/http: TLS handshake timeout”
    java线程的几个状态和锁的作用范围
    简单管理WPF及Winform所有弹出窗体
    FastJson学习
    基于消息中间件实现流量削峰
    pandas
    DBSCAN
    A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead
  • 原文地址:https://www.cnblogs.com/lindows/p/14390619.html
Copyright © 2020-2023  润新知