0 0

publicId 和 systemId 究竟是个什么东东?3

org.xml.sax.InputSource中有publicId 和 systemId
这个public identifier 和 system identifier究竟是个啥玩意儿?
谁跟我讲讲啊?

    /**
     * Set the public identifier for this input source.
     *
     * <p>The public identifier is always optional: if the application
     * writer includes one, it will be provided as part of the
     * location information.</p>
     *
     * @param publicId The public identifier as a string.
     * @see #getPublicId
     * @see org.xml.sax.Locator#getPublicId
     * @see org.xml.sax.SAXParseException#getPublicId
     */
    public void setPublicId (String publicId)
    {
	this.publicId = publicId;
    }

    /**
     * Set the system identifier for this input source.
     *
     * <p>The system identifier is optional if there is a byte stream
     * or a character stream, but it is still useful to provide one,
     * since the application can use it to resolve relative URIs
     * and can include it in error messages and warnings (the parser
     * will attempt to open a connection to the URI only if
     * there is no byte stream or character stream specified).</p>
     *
     * <p>If the application knows the character encoding of the
     * object pointed to by the system identifier, it can register
     * the encoding using the setEncoding method.</p>
     *
     * <p>If the system identifier is a URL, it must be fully
     * resolved (it may not be a relative URL).</p>
     *
     * @param systemId The system identifier as a string.
     * @see #setEncoding
     * @see #getSystemId
     * @see org.xml.sax.Locator#getSystemId
     * @see org.xml.sax.SAXParseException#getSystemId
     */
    public void setSystemId (String systemId)
    {
	this.systemId = systemId;
    }


2010年5月20日 11:09

1个答案 按时间排序 按投票排序

0 0

采纳的答案

看看Wiki上的解释吧。

引用

A public identifier is a document processing construct in SGML and XML.

In HTML and XML, a public identifier is meant to be universally unique within its application scope. It typically occurs in a Document Type Declaration.

A public identifier is meant to identify a document type that may span more than one application.

引用

A system identifier is meant for a document type that is used exclusively in one application.

2010年5月20日 14:06

相关推荐

    Laravel开发-public-id

    总的来说,通过使用`hashids`库,Laravel开发者可以轻松地为应用中的每个记录生成安全且易读的`public-id`,从而提升用户体验和安全性。这个`public-id-master`文件可能是项目的源码示例,帮助开发者理解如何在实际...

    配置dtd文件步骤

    2. **选择Public ID和System ID**:接下来,你需要为Mapper文件和Config文件分别指定Public ID和System ID。这些ID用于唯一标识这些文件,并在XML文档中引用它们。 - **Public ID**:通常是一个字符串,用以标识DTD...

    二十三种设计模式【PDF版】

    Decorator 是个油漆工,给你的东东的外表刷上美丽的颜色. 设计模式之 Bridge(桥连) 将牛郎织女分开(本应在一起,分开他们,形成两个接口),在他们之间搭建一个桥(动态的结合) 设计模式之 Flyweight(共享元) 提供 ...

    System.arraycopy和Arrays.copyOf

    `System.arraycopy` 和 `Arrays.copyOf` 都是Java中用于复制数组的方法,但它们在使用和处理异常情况上有所不同。这两个方法在处理数组复制时,提供了便利和效率,但各有其适用场景。 `System.arraycopy` 是一个...

    myeclipse_9.1_10active

    填写systemid 1. myeclipse 激活窗口中可以看到systemid 2. 点击Systemid... 按钮,自动生成本机器的systemid。 点击Active按钮进行计算序列号和激活码。会在下方文本框中显示计算后的信息。 破解程序可以计算...

    Java问题宝典2012版

    11、"=="和equals方法究竟有什么区别? 12 12、静态变量和实例变量的区别? 13 13、是否可以从一个static方法内部发出对非static方法的调用? 13 14、Integer与int的区别 13 15、Math.round(11.5)等於多少? Math....

    第三章 继承与多态 掌握封装的含义及用法 什么是继承? 继承有什么作用? 怎么写继承?

    **继承** 是面向对象编程中的一项核心特性,它允许一个类(称为子类或派生类)继承另一个类(称为父类或基类)的属性和方法。通过继承,可以有效地复用已有的代码,并在此基础上添加新的功能。 **继承的作用**: 1...

    c#USB设备ID信息查询

    这里我们创建了一个新的类`USBDeviceInfo`来存储设备的ID、描述和制造商。查询条件改为服务为`usbd`或`usbuhci`,因为这些服务通常与USB设备关联。 最后,你可以调用这些方法来获取USB设备的信息并在应用程序中使用...

    C#中在一个窗体里调用另一个窗体的方法

    在C#中,窗体之间的方法调用是一个常见的需求,特别是在复杂的桌面应用程序设计中。本文将根据提供的标题、描述、标签以及部分内容,详细介绍如何在C#的一个窗体中调用另一个窗体的方法,并探讨其中涉及的技术细节。...

    VB用户控件制作.doc

    用户控件主要包括三个部分:定义控件的属性、事件和方法,保存和读取中间用户设置的属性值,达到预定目的而调用的各种技术手段。 在用户控件中定义的属性、事件、方法,其性质都必须是公用的,也就是说,只有用 ...

    myeclipse 10.x 破解补丁 和 注册码

    * 生产出来的systemid和exe破解出来的那个对应不上,这个问题我也研究了,没有问题,因为myeclipse里面只要找到能对上一组的数据,systemid就算对上了。 如果某个操作系统systemid不对,打开myeclipse---myeclipse...

    最新Java面试宝典pdf版

    11、"=="和equals方法究竟有什么区别? 11 12、静态变量和实例变量的区别? 12 13、是否可以从一个static方法内部发出对非static方法的调用? 12 14、Integer与int的区别 13 15、Math.round(11.5)等於多少? Math....

    Java应用程序试卷

    这段代码会输出 "Name: null ID: null",因为 `name` 和 `id` 都没有初始化,它们的默认值是 `null`。 这些题目覆盖了 Java 编程的多个方面,包括文件扩展名、线程状态、GUI 组件、异常处理、访问控制、垃圾回收、...

    System.Web.Http.dll, v5.2.3.0

    这个版本号为v5.2.3.0的库,是针对WebApi项目设计的,其中包含了重要的特性——特性路由注册,这是一个关键的路由管理机制,极大地提高了API的可维护性和灵活性。 特性路由是ASP.NET Web API 2引入的一个新特性,它...

    import java.io.*; public class FirstPart{ public static void main(String[] args) throws Exception{ System.out.print("The input Fahrenheit is "); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int f = Integer.parseInt(br.re

    public class FirstPart{ public static void main(String[] args) throws Exception{ System.out.print("The input Fahrenheit is "); BufferedReader br = new BufferedReader(new InputStreamReader(System.in));...

    java个人笔记总结包含45个word,绝对的原创。

    45个word,每个word都是本人精心积累,例如关于static用法的部分: class A{ public static int i=10; //不再是某个对象的,是所有对象共有的。静态变量存放在“数据段”,只有一个拷贝。属于类 public void show...

    如何压缩多个文件\文件夹(GZipStream and C#)

    1. 引入命名空间:首先需要在C#代码中引入`System.IO`和`System.IO.Compression`两个命名空间。 ```csharp using System.IO; using System.IO.Compression; ``` 2. 创建FileStream对象:准备要压缩的文件,创建一个`...

    System.Web.Http.dll(引用)

    这个DLL文件中的主要命名空间就是System.Web.Http,它包含了大量类和接口,用于构建Web API控制器、路由、模型绑定、过滤器、异常处理等关键功能。以下是一些关键类: 1. **ApiController**:所有Web API控制器的...

    dd-wrt_public_vga.image

    **dd-wrt_public_vga.image** 是一个专为路由器设计的操作系统映像文件,它基于Linux内核,被广泛用于改装各种消费级路由器,以提供更高级的功能和更精细的控制。dd-wrt是一个开源项目,其目标是为用户提供一个功能...

Global site tag (gtag.js) - Google Analytics