Text content : Introduction « Introduction « XML Tutorial






<name> 
    <first>Bond</first>
    <middle>JK</middle>
    <last>James</last>
</name> 

Data from the beginning of a start-tag to the end of an end-tag is called an element. 

<first>is a start-tag

</first>is an end-tag 

<first>John</first>is an element 

The text between the start-tag and end-tag of an element is called the element content. 
If the content is just data, not other elements, the element content is referred to as parsed character data, or PCDATA.
PCDATA is also referred as with "text content" or "text node." 

You can include a space before the closing > of a tag

<name> 
    <first >Bond</first >
    <middle>JK</middle>
    <last>James</last>
</name> 

or 

<name> 
<first >Bond</first >
<middle>JK</middle>
<last>James</last>
</name> 

You cannot put a space after the opening < character in a tag, or the / character in an end-tag

Therefore, the following is not proper XML syntax: 

< first >Bond< /first > 

Neither is this: 

< first >Bond< / first >








1.1.Introduction
1.1.1.Elements, Attributes, and Values
1.1.2.Text content