注册 登录
编程论坛 Ruby论坛

菜鸟问题····

3201 发布于 2005-06-20 16:01, 3563 次点击
<?xml version="1.0" ?> <!DOCTYPE BOOK [ ····· ] > 请问一下 红色部分是自己定义的吗 ? 还是有什么规定的 ?
3 回复
#2
jeremydomett2005-06-26 15:42
应该是自己定义的吧。。。
#3
E恒2005-09-08 20:07
这么简单的问题你也要问啊。你可以自己去尝试啊,去更改啊。如果更改后出现错误那么就是不可更改的标签,反之就是可以更改啦!!学程序嘛就是要多练,多尝试,又不会出人命怕什么???
#4
唐伯猫2006-03-13 16:41

在以下的例子里,红色部分就是自己定义的,好象兰色部分不可以自己定义.具体的我也不是很明白,因为也是第一次遇到这样的问题.
using System;
using System.IO;
using System.Xml;

public class Sample
{
public static void Main()
{
// Create the XmlDocument.
XmlDocument doc = new XmlDocument();
doc.LoadXml("<!DOCTYPE sfsf [<!ENTITY h 'hardcover'>]>" +
"<book genre='novel' ISBN='1-861001-57-5'>" +
"<title>Pride And Prejudice</title>" +
"<style>&h;</style>" +
"</book>");

// Display information on the DocumentType node.
XmlDocumentType doctype = doc.DocumentType;
Console.WriteLine("Name of the document type: {0}", doctype.Name);
Console.WriteLine("The internal subset of the document type: {0}", doctype.InternalSubset);

}
}

1