-
Essay / What is XML implementation? - 1024
2. XML2.1 implementation XML2.1.1 document. Elements2.1.2. Attributes2.1.3 Text2.1.4 Empty elements2.1.5 Well-formed XML2.1.6 Namespaces2.2 XML validation2.2.1 Document type definition2.2.2. XML Schema2.3 Software Tools2.4 XML Parsers2.5 XML Query2. XML Implementation 2.1 XML Syntax XML documents must follow strict format requirements set forth by the W3C. This evolved from SGML, but is very different from it. A well-formed XML document meets these requirements, particularly in terms of elements, attributes, text, etc.2.1.1. ElementsElements are the basic elements of an XML document and can be thought of as containers. An element is defined with a start tag and an end tag. Each of these tags consists of the element type name (must be a valid XML name) surrounded by a pair of angle brackets (< >) and looks like: text Sometimes elements without attributes or text can also be represented like: or orThis is generally used to fit a predefined data structure. Element names are defined by the developer and must respect the following basic rules: • The element name must begin with a letter or underscore (_), not with "XML" (preserved by XML) ;• The element name cannot contain spaces. Underscore is often used to replace space; • The element name can contain any number of letters, numbers, and underscores; • Colons (:) are not recommended because they are generally reserved for the namespace; • Dots (.) are not recommended. , because it could complicate the operation of the object;• A hyphen (-) is not recommended, because it could confuse the operator (-) of the subtraction program;• All nouns, to make the distinction between the beginning and the end of the... middle of paper ...... called mixed content ;• Empty elements, some elements contain no content , called empty elements. Written at / > ends of independent labels. Although DTDs are still used for XML validation, they have several major limitations. First, it is not written in XML syntax; so we need to learn a new syntax to develop a DTD. Second, DTD does not support namespace, which limits its extensibility, as we discussed previously. Additionally, no restrictions are imposed on the type of character data (such as date, time). To resolve these issues, an XML Schema is a W3C recommendation for the XML.2.2.2 Validation Update Document Format. XML SchemaXML Schema is an XML-based alternative to the DTD which is used to describe the structure of an XML document and is therefore used to validate it. XML Schema language is also called XML Schema Definition (XSD).2.3 Software tools