XML Memo DTD PCDATA CDATA

Source: Internet
Author: User

XML differs from html,html for presenting data, and XML for storing and exchanging data.

XML regardless of platform differences, hardware and software differences, as long as the ability to read the operation file, you can process the XML file, the data stored inside the operation. Avoid data format incompatibility and make data exchange between different systems more feasible

1. Note: Entity references, because XML needs to use some symbols as the key to differentiate data, so when you want to use them as characters only when you need the entity reference, and & must use the entity reference, the other best also use.

&lt;< less than &gt;> greater than &amp;& and number &apos; ' Single quote &quot; " quotation marks

2. Note: Spaces in XML are preserved

3.xml Store line wrap in LF

XML Naming conventions

XML elements must follow the following naming conventions:

    • Names can contain letters, numbers, and other characters
    • Names cannot start with numbers or punctuation marks
    • The name cannot start with the character "XML" (or XML, XML)
    • Name cannot contain spaces

You can use any name without a reserved word.

XML DTD

The role of a DTD is to define the structure of an XML document. It uses a series of legitimate elements to define the document structure:

PCDATA

PCDATA means the parsed character data (parsed character).

You can think of character data as text between the opening and closing tags of an XML element.

PCDATA is the text that will be parsed by the parser. The text will be examined by the parser entity and tagged.

The labels in the text are treated as tokens, and the entities are expanded.

However, the parsed character data should not contain any &, <, or > characters; you need to use &amp;, &lt; and &gt; Entities to replace them separately.

Cdata

CDATA means character data (character).

CDATA is text that will not be parsed by the parser. the labels in these texts are not treated as tokens, and the entities in them are not expanded.

Reference: http://code727.iteye.com/blog/1882877

http://www.iteye.com/topic/517520

XML Memo DTD PCDATA CDATA

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.