以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 XML基础 』 (http://bbs.xml.org.cn/list.asp?boardid=1) ---- [求助]大家帮我看看这是为什么呀?谢谢了 (http://bbs.xml.org.cn/dispbbs.asp?boardid=1&rootid=&id=5723) |
-- 作者:初学者 -- 发布时间:3/18/2004 2:56:00 PM -- [求助]大家帮我看看这是为什么呀?谢谢了 一个是DTD文件,一个是XML文件,为什么XML SPY老是说根元素和DTD文件不匹配。 test.dtd: ------------------------------------------------- <?xml version="1.0" encoding="iso-8859-1"?> <!ELEMENT TVGuide (Channel+)> <!ATTLIST TVGuide start CDATA #REQUIRED end CDATA #REQUIRED > <!ELEMENT Channel (Name,Program+)> <!ELEMENT Name (#PCDATA)> <!ELEMENT Program (Start,Duration,Series,Title,Description*,CastList*,Writers*,Director*,Producer*)> <!ATTLIST Program ration CDATA #IMPLIED flag CDATA #IMPLIED type CDATA #IMPLIED > <!ELEMENT Start (#PCDATA)> <!ELEMENT Duration (#PCDATA)> <!ELEMENT Series (#PCDATA)> <!ELEMENT Title (#PCDATA)> <!ELEMENT Description (#PCDATA)> <!ELEMENT CastList (CastMember+)> <!ELEMENT Writers (Writer+)> <!ELEMENT Director (Name)> <!ELEMENT Producer (Name)> <!ELEMENT CastMember (Character,Actor)> <!ELEMENT Writer (Name)> <!ELEMENT Character (Name)> <!ELEMENT Actor (Name)> ----------------------------------------------------- test.xml: ---------------------------------------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE TVGruide SYSTEM "test.dtd"> <TVGuide start="2001-07-05" end="2001-07-05"> <Channel> <Name>BBC1</Name> <Program rating="5" flag="favorite"> <Start>2001-07-05T19:30:00</Start> <Duration>PT30M</Duration> <Series>EastEnders</Series> <Title /> <Description> Mark's health scare forces him to reconsider his future with Lisa, while Jamie is torn between Sonia and Zoe. </Description> <CastList> <CastMember> <Character> <Name>Jamis Mitchell</Name> </Character> <Actor> <Name>Jack Ryder</Name> </Actor> </CastMember> <CastMember> <Character> <Name>Sonia Jackson</Name> </Character> <Actor> <Name>Natalie Cassidy</Name> </Actor> </CastMember> </CastList> <Writers> <Writer> <Name>Julie Wassmer</Name> </Writer> </Writers> <Director> <Name>Stewart Edwards</Name> </Director> <Producer> <Name>Emma Turnet</Name> </Producer> </Program> <Program type="documentary"> <Start>2001-07-05T20:00:00</Start> <Duration>PT45M</Duration> <Series /> <Title>Get Real with Casualty</Title> </Program> <Program> <Start>2001-07-05T20:45:00</Start> <Duration>PT45M</Duration> <Series>Lottery</Series> <Title /> </Program> </Channel> <Channel> <Name>ITV</Name> <Program> <Start>2001-07-05T20:00:00</Start> <Duration>PT1H</Duration> <Series>Millionaire</Series> <Title /> </Program> <Program> <Start>2001-07-05T21:00:00</Start> <Duration>PT2H</Duration> <Series /> <Title>Hot Money</Title> </Program> </Channel> </TVGuide> |
-- 作者:初学者 -- 发布时间:3/19/2004 10:59:00 AM -- 没人帮我看一下呀??? |
-- 作者:marilyn -- 发布时间:3/19/2004 11:15:00 AM -- start CDATA #REQUIRED end CDATA #REQUIRED 俺也不懂:( |
-- 作者:admin -- 发布时间:3/19/2004 11:27:00 AM --
|
-- 作者:marilyn -- 发布时间:3/19/2004 11:30:00 AM -- 天哪,老大 的眼神可真是没的说~~~呵呵 |
-- 作者:泉韵星魂 -- 发布时间:3/19/2004 11:41:00 AM -- 还有一处 test.dtd: <!ATTLIST Program ration CDATA #IMPLIED flag CDATA #IMPLIED type CDATA #IMPLIED > 在test.xml中 <Program rating="5" flag="favorite"> rating应该改为ration.... |
-- 作者:初学者 -- 发布时间:3/19/2004 1:27:00 PM -- 多少感动尽不在言中。。。。。。。。。。。。。。。。。 以后的学习中还得需要大家的帮助啊。。。。。。。。。。。 谢谢!!!谢谢!!!谢谢!!!谢谢!!!谢谢!!!谢谢!!!谢谢!!! |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
5,656.250ms |