学习型 ASP/PHP/ASP.NET 主机 30元/年全能 ASP/PHP/ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
发新话题
打印

菜鸟问题····

菜鸟问题····

<?xml version="1.0" ?> <!DOCTYPE BOOK [ ····· ] > 请问一下 红色部分是自己定义的吗 ? 还是有什么规定的 ?

TOP

应该是自己定义的吧。。。
热爱编程........永不放弃.........

TOP

这么简单的问题你也要问啊。你可以自己去尝试啊,去更改啊。如果更改后出现错误那么就是不可更改的标签,反之就是可以更改啦!!学程序嘛就是要多练,多尝试,又不会出人命怕什么???
欢迎访问我的博客:www.szheng.net

TOP

在以下的例子里,红色部分就是自己定义的,好象兰色部分不可以自己定义.具体的我也不是很明白,因为也是第一次遇到这样的问题.
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);

}
}

╭∩╮︶︿︶╭∩╮鄙视他! ---打劫!!!!! 把嘴拿过来让我亲亲!

TOP

发新话题