Kai
Kai

Reputation: 1477

XML-element with content #PCDATA or list of 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?

Upvotes: 0

Views: 412

Answers (1)

m0sa
m0sa

Reputation: 10940

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

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

Upvotes: 2

Related Questions