What is Building Block in XML
Posted in
XML | DTD July 03, 2019
This topic teach you what are main Building Block in XML
XML Building Block
Building block means which all element or part that make a xml document .
These element are
- Element
- Attributes
- Entities
- PCDATA
- CDDATA
Element
Element is one of main building block of xml language and HTML language also.
Example of HTML element are " body" and "table ".
And example of xml elements "note" and "message". one element can contain text , of other elements, or be empty also .
Example of empty Html element are " hr" and "br".
Example
<body>my first text in body part </body>
<message>my first text in message element </message>
|
Attributes
Attributes makes more powerful to the element . because it is placed inside in element for this attributes capability of element get enhance.
It is always come in name and its value in a pair.
Example:
< img src="mycomputer.jpg" />
|
Entities
Some character work like a keyword that has a special meaning in xml. like the less than (<) it is define the opening tag in xml .
PCDATA
PCDATA stands for parsed character data.
character data are written in between the start tag and the end tag of an XML element.
PCDATA is the text that is parsed by the parser. text checked by the parser in for entities and markup. which all text written inside in the xml tag treated like a markup. parsed character data should not contain any contain any special character like & ,>,< etc.
CDDATA
CD DATA is also special type of text in xml. that is not parsed by the parser. the text that is written inside the tag not treated like a markup.
further Readings
You may also want to read these related articles :
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here