Both are different. <!ELEMENT item (#PCDATA|item)*> can include any parsed data along with other element item in it. but in case of<!ELEMENT item (#PCDATA)*> it can only include parsed data, it cant hold any other element item in it. it will give an error if "<" placed in side element.
please correct if iam wrong
posted 14 years ago
but that part is understood.
item is anyway a parsed data right?
why not write
instead of ?
what is the difference between the two scripts given above?
Can you please help? [ April 11, 2006: Message edited by: ArulJose ]
PCDATA is parsed character data. It means, that content marked as #PCDATA will be parsed - i.e. the parser will try to recognize markup in the content. Obviously, if it encounters <item> it woul treat it as an element -item-, but the DTD says, that root element cannot have any nested elements.
It's feeding time! Give me the food you were going to give to this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book