Reputation: 20178
In a dtd, can an element be defined as
<!ELEMENT name (ANY|EMPTY)>
meaning that an name can either be like <name/>
or it can contain any elements that does break xml rules?
Upvotes: 2
Views: 609
Reputation: 52888
No, but if you use the type ANY
, it can still be empty.
Examples:
<!DOCTYPE name [
<!ELEMENT name ANY>
]>
<name/>
-
<!DOCTYPE name [
<!ELEMENT name ANY>
<!ELEMENT foo (#PCDATA)>
]>
<name>
<foo/>
</name>
Upvotes: 2