Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making sure an element has a value

Status
Not open for further replies.

madlarry

Programmer
Dec 6, 2000
117
GB
Hi,

I am creating a DTD. I want to make sure that a value is entered into an element and not left blank.

For example, I have the following element:

<!ELEMENT firstname (#PCDATA)>

This allows someone to create an XML document without an actual value ( <firstname/> ).

How do I make sure that it always has a value?? (i.e. <firstname>fred</firstname> ).

I get the feeling I'm missing something pretty obvious!

Thanks,

madlarry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top