[英]XML-element with content #PCDATA or list of elements
I like to define a DTD with an element like following: 我喜欢用以下元素定义DTD:
<result>
<name/><resultType/>[more elements...]
</result>
OR it could be:
<result>Some text</result>
My element definition looks like that: 我的元素定义如下:
<!ELEMENT result ((name,resultType,...,pages)|#PCDATA)>
But Visual Studio says that this isn't valid. 但Visual Studio表示这无效。
Any solutions for that? 有什么解决方案吗?
The #PCDATA
has to be one of the elements listed in the parenthesis and delimited by |
#PCDATA
必须是括号中列出的元素之一,并由|
分隔 . 。 Try:
尝试:
<!ELEMENT rootelement (#PCDATA|childel1|childel)*>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.