• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 347
  • Last Modified:

DTD empty elements

How can I forbid empty elements in a DTD? So <elementname/> is not allowed in the XML.
0
paulineb
Asked:
paulineb
1 Solution
 
savalouCommented:
Unless you specify an element content, you cannot do this in a DTD.  You have to use a schema.  A possible workaround would be to make the required content an attribute since CDATA attributes cannot be empty strings.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now