开发者

XML-element with content #PCDATA or list of elements

开发者 https://www.devze.com 2023-03-07 13:40 出处:网络
I like to define a DTD with an element like following: <result> <name/><resultType/>[more elements...]

I like to define a DTD with an element like following:

<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.

Any solutions for that?


The #PCDATA has to be one of the elements listed in the parenthesis and delimited by |. Try:

<!ELEMENT rootelement (#PCDATA|childel1|childel)*>
0

精彩评论

暂无评论...
验证码 换一张
取 消