This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
notes:xml_cheat_sheet [2026/07/22 02:30] 47.79.202.41 old revision restored (2026/06/13 23:31) |
notes:xml_cheat_sheet [2026/07/24 19:16] (current) 47.79.206.148 old revision restored (2026/06/21 09:05) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== XML Cheat Sheet ===== | ===== XML Cheat Sheet ===== | ||
| - | I stumble across XML documents intermittently and every time I need to review the basics again. This is a cheat sheet so that I can review it whenever I need to. Information here is a summarized form of the [[http:// | + | I stumble across XML documents intermittently and every time I need to review the basics again. This is a cheat sheet so that I can review it whenever I need to. This is a summarized form of the [[http:// |
| + | |||
| + | Also see the following related cheat sheets : | ||
| + | * [[DTD Cheat Sheet]] | ||
| + | * [[XML Schema Cheat Sheet]] | ||
| ==== What is XML ==== | ==== What is XML ==== | ||
| Line 53: | Line 57: | ||
| * A DTD or XML Schema defines the document structure with a list of legal elements and attributes. | * A DTD or XML Schema defines the document structure with a list of legal elements and attributes. | ||
| + | |||
| ==== XML Elements ==== | ==== XML Elements ==== | ||
| Line 76: | Line 81: | ||
| * A CDATA section starts with "< | * A CDATA section starts with "< | ||
| - | * Everything inside a CDATA section except for [[> is permitted. | + | * Everything inside a CDATA section except for ]]> is permitted. |
| ==== XML Attributes ==== | ==== XML Attributes ==== | ||
| Line 103: | Line 108: | ||
| * If the form xmlns=" | * If the form xmlns=" | ||
| - | |||
| - | ==== Document Type Definition (DTD) ==== | ||
| - | |||
| - | * A **D**ocument **T**ype **D**efinition (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 internally defined e.g. < | ||
| - | < | ||
| - | element-declarations | ||
| - | ]> | ||
| - | </ | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | * A simple example of DTD element-declarations < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | * A DTD for an XML document may contain the following building blocks | ||
| - | * elements | ||
| - | * attributes | ||
| - | * entities (e.g. character entities) | ||
| - | * PCDATA (parsed character data parsed for entities and markup) | ||
| - | * CDATA (character data that is not parsed) | ||
| ==== XML Stylesheets ==== | ==== XML Stylesheets ==== | ||