<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>石无言 &#187; XML</title>
	<atom:link href="http://www.hugstone.com/index.php/archives/tag/xml/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hugstone.com</link>
	<description>三生石前问一声，人间哪里修正果！</description>
	<lastBuildDate>Thu, 26 Aug 2010 02:57:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>[XML] XML问题记录</title>
		<link>http://www.hugstone.com/index.php/archives/225</link>
		<comments>http://www.hugstone.com/index.php/archives/225#comments</comments>
		<pubDate>Wed, 15 Apr 2009 08:16:05 +0000</pubDate>
		<dc:creator>stone</dc:creator>
				<category><![CDATA[Note]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.hugstone.com/?p=225</guid>
		<description><![CDATA[<p><strong>Question 1:</strong><br />
以前建了一个XML文件，验证格式为DTD，在JAVASCRIPT中调中就一直没调用出来，这个问题后来一直放在那也没去解决，直到这段时间重新学习了一个XML，才将该问题解决：</p>
<p>以下为那个DTD文件内容：<br />
<code>&#60;!ELEMENT myfile (title,author)&#038;gt[......]</code></p><p class='read-more'><a href='http://www.hugstone.com/index.php/archives/225'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Question 1:</strong><br />
以前建了一个XML文件，验证格式为DTD，在JAVASCRIPT中调中就一直没调用出来，这个问题后来一直放在那也没去解决，直到这段时间重新学习了一个XML，才将该问题解决：</p>
<p>以下为那个DTD文件内容：<br />
<code>&lt;!ELEMENT myfile (title,author)&gt;<br />
&lt;!ELEMENT title (#PCDATA)&gt;<br />
&lt;!ELEMENT author(#PCDATA)&gt;</code><br />
在XML SPY中验证出错，错误提示如下：</p>
<p>File C:\Documents and Settings\Administrator\桌面\3\myfile.dtd is not valid.<br />
Character '(' is grammatically unexpected<br />
Reason: one of the following is expected (see below)<br />
S<br />
Details<br />
XML production: Production 'elementdecl' not satisfied</p>
<p>最终发现问题出在了最后一行：<br />
&lt;!ELEMENT author(#PCDATA)&gt; 的author和(#PCDATA)之间没有空格，所以才造成以上的错误。</p>
<p><strong>Question 2:<br />
</strong>在XML SPY中新建一XML文件（没注意到DTD文件类型），将格式正确完整的DTD内容输入，验证通不过，保存为DTD文件，验证通不过，将该文件关闭重新打开，验证通过。<br />
在XML SPY中新建一DTD文件，将DTD内容输入，验证通过。<br />
(在XMLSPY中新建文件时注意文件类型)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hugstone.com/index.php/archives/225/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
