What Is XML Implementation?

1024 Words3 Pages

2. XML Implementation
2.1 XML Document
2.1.1. Elements
2.1.2. Attributes
2.1.3 Text
2.1.4 Empty elements
2.1.5 Well-Formed XML
2.1.6 Namespaces
2.2 XML Validation
2.2.1 Document Type Definition
2.2.2. XML Schema
2.3 Software Tools
2.4 XML Parsers
2.5 XML Query

2. XML Implementation
2.1 XML Syntax
XML Documents must follow strict format requirements formulated by W3C. This evolved from SGML, but is very different with it. A well-formed XML document fulfills these requirements including elements, attributes, text, etc.
2.1.1. Elements
Elements are the basic building blocks of an XML document, and may be thought of as containers. An element is defined with a start-tag and end-tag. Each of these tags consists of the element type name (must be a valid XML name) enclosed within a pair of angle brackets (< >) and it looks like: text Sometimes, elements with no attributes or text can also be represented as: or or

This is usually used to accommodate a predefined data structure.
The names of the elements are developer defined and must adhere to the following basic rules:
• Element name must start with a letter or an underscore (_), and not to "XML" (retained by XML);
• Element name cannot contain Spaces. The underline is often used to replace the space;
• Element name can contain any number of letters, Numbers, underscore;
• A colon (:) is not recommended, because it is usually reserved for namespace;
• Dots (.) is not recommended, as it may be a mess of the object operation;
• A hyphen (-) is not recommended, because it might confuse subtraction program (-) operator;
• All names, to distinguish between the start and end ta...

... middle of paper ...

... called mixed content;
• Empty elements, some elements do not contain any content , called empty elements. Written to / > independent label ends.
While DTDs are still in use for XML validation, it has several major limitations. First, it is not written in XML syntax; therefore, we have to learn a new syntax to develop a DTD. Second, DTD does not support namespace, limiting its extensibility, as we discussed earlier. In addition, there are no restrictions imposed character data type (such as date, time). In order to solve these problems, an XML Schema is a W3C recommendation for XML validation update document format.
2.2.2. XML Schema
XML Schema is an XML-based alternative to DTD that is used to describe the structure of an XML document and thus is utilized to validate it. The XML Schema language is also referred to as XML Schema Definition (XSD).
2.3 Software Tools

More about What Is XML Implementation?

Open Document