简体   繁体   English

BaseX XML数据库编码

[英]BaseX XML database coding

I'm trying to create a DTD but have hit a wall. 我正在尝试创建DTD,但遇到了麻烦。 I keep getting pretty much the same error regardless of what I change the type to. 无论我将类型更改为什么,我都会得到几乎相同的错误。 Where am I going wrong? 我要去哪里错了?

<!ELEMENT movies (movie+)>
<!ELEMENT movie EMPTY>
<!ATTLIST movie id CDATA #REQUIRED>
<!ELEMENT budget (#PCDATA)>

The error I am receiving is "Failed to parse XML file: file:///E:/tmdb_5000_movies.xml error occured at line: 52, column:9 cause of error: The content of element type "movie" must match "EMPTY"." 我收到的错误是“无法解析XML文件:file:/// E:/tmdb_5000_movies.xml错误发生在第52行,第9列,错误原因:元素类型“ movie”的内容必须与“ EMPTY”匹配“” This is the xml database its working off of. 这是其工作的xml数据库。

You've declared the element movie as EMPTY and the picture of your data includes child elements of movie. 您已将元素movie声明为EMPTY,并且数据图片包含movie的子元素。 So, as the error says, your movie element isn't empty. 因此,正如错误所述,您的电影元素不为空。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM