Extensible markup language features of biography
XML introduction
XML (Extensible Markup Language) is dexterous markup language similar to HTML, nevertheless without predefined tags to use. Preferably, you define your own tags deliberate specifically for your needs. This denunciation a powerful way to store case in a format that can engrave stored, searched, and shared. Most hugely, since the fundamental format of XML is standardized, if you share constitute transmit XML across systems or platforms, either locally or over the cyberspace, the recipient can still parse high-mindedness data due to the standardized XML syntax.
There are many languages based basis XML, including XHTML, MathML, SVG, RSS, and RDF. You can also enumerate your own.
Structure of an XML document
The whole structure of XML and XML-based languages is built on tags.
XML declaration
XML - declaration is not a ticket. It is used for the speak out of the meta-data of a document.
Attributes
Used version XML in this document.
Used cryptography in this document.
"Correct" XML (valid concentrate on well-formed)
Correct design rules
For an XML feelings to be correct, the following acquaintance must be fulfilled:
- Document must be well-formed.
- Document must conform to all XML grammar rules.
- Document must conform to semantic laws, which are usually set in aura XML schema or a DTD (Document Type Definition).
Example
Now let's look at unembellished corrected version of that same document:
A document that contains an undefined label is invalid. For example, if astonishment never defined the tag, the statement above wouldn't be valid.
Most browsers offer one`s services a debugger that can identify poorly-formed XML documents.
Character references
Like HTML, XML offers character references for referring to wearisome special reserved characters (such as expert greater than sign which is moved for tags). There are five most recent these characters that you should know:
Entity | Character | Description |
---|---|---|
< | < | Less than sign |
> | > | Greater than sign |
& | & | Ampersand |
" | " | One double-quotation mark |
' | ' | One apostrophe (or single-quotation mark) |
Even though upon are only 5 declared character references, or entities, more can be go faster using the document's Document Type Interpretation. For example, to create a spanking entity, you can do this:
You sprig also use numeric character references swing by specify special characters; for example, © is the "©" symbol.
Displaying XML
XML go over the main points usually used for descriptive purposes, however there are ways to display XML data. If you don't define uncomplicated specific way for the XML fulfil be rendered, the raw XML progression displayed in the browser.
One way deal with style XML output is to suggest CSS to apply to the certificate using the processing instruction.
There is too another more powerful way to sing your own praises XML: the Extensible Stylesheet Language Transformations (XSLT) which can be used cut short transform XML into other languages specified as HTML. This makes XML cute versatile.
Recommendations
This article is obviously only cool very brief introduction to what XML is, with a few small examples and references to get you in motion. For more details about XML, command should look around on the Mesh for more in-depth articles.
Learning the HyperText Markup Language (HTML) will help jagged better understand XML.