tags:

views:

55

answers:

2
+1  Q: 

xml <! > element

hi guys,

is there any connection between notation of CDATA sections and internal DTD definition? i mean both of these things are closed in that <! > element... so i wondered if there is any special meaning for this kind of element or is it just made exception considered as standard for defining CDATA and DTD ?

if you can't understand what's on my mind simply said my question is "what is the function of <! > element in general? (if there is some)"

+4  A: 

It is a processor instruction. It is meant for the XML parser to interpret rather than be considered as part of the data of the XML document.

Doug D
but the parser won't let it pass if you leave it void.?. so if there is nothing in it that could be somehow interpreted it's considered as xml data and thus not valid... ? ?
stupid_idiot
I'm not sure what the parser would do if the proc instr was invalid/void. It could throw an exception or ignore it. Probably would depend on which parser was being used.
Doug D
A: 

Text defined in CDATA section in an xml document is not parsed by the xml processor.

A Document Type Definition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list of legal elements and attributes.

A DTD can be declared inline inside an XML document, or as an external reference.

ChadNC