Does XML contains only Tags and PCDATA as syntactic constructs? or is there anything more?
Cheers,
Dan
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The main constructs you encounter are tags, entities and text. There are others (notably: processing instructions, doctype declarations and the XML declaration) that are less common.
Entities are sequences of characters starting with a
&and ending with a;, and you normally encounter them for things like>and&and so on. They stand for other things (like particular characters, but those aren’t the only possibilities).The XML declaration is the sequence that starts with
<?xmland ends with?>that goes at the beginning of your document. It looks similar to a processing instruction (which also begins with<?) but formally isn’t.Doctype declarations begin with
<!and are where you should get an XML library instead of trying to decode things by yourself; the document type system is complicated!