Send
Close Add comments:
(status displays here)
Got it! This site "robinsnyder.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website. Note: This appears on each machine/browser from which this site is accessed.
XML: Extensible markup language
1. XML: Extensible markup language
XML (Extensible Markup Language) is a web technology for separating form, content, and structure.
Many companies and software developers have and continue to use XML to represent data for exchange between systems.
2. Microsoft Office
Microsoft Office has file formats based on XML called OpenXML (
docx,
xlsx,
pptx).
A doc file is the older proprietary format.
A docx file is the newer OpenXml format. The x at the end is for XML.
3. XML structure
XML has tags and attributes, like HTML, but has very precise rules for syntax.
A form of HTML called XHTML is an XML format.
In HTML the tag <br> is acceptable.
In XHTML, the tag <br /> is required.
In XHTML, the tag <br></br> is required.
XML requires the XHTML-like syntax.
4. HTML
Here is the HTML for a link "
Click Here" that, when clicked, links to the web site
http://www.RobinSnyder.com.
<a href="http://www.RobinSnyder.com">Click Here</a>
The HTML tag is "a".
An attribute of the "a" tag is the "href" attribute.
The value of the "href" attribute is, in this case, "http://www.RobinSnyder.com".
The link would appear and act as follows:
Click Here
Note that the displayed text is not where the link goes. This is a problem in phishing.
5. XML
XML is text, and designed to be readable.
In XML, whoever designs the format can decide on the tag names, attribute names, etc.
Someone else designed HTML, so you have to follow the rules for HTML.
You can design your own XML, as long as you follow your own rules.
If you want others to use your XML format, you must convince them to use your rules.
6. Example
Here is a simplified example of XML being used to represent transcript data.
(omitted due to encoding issues)
7. Readability
XML is (usually) very readable.
The root tag is transcript.
The other tags are taken and taking.
Some attributes include semester, prefix, suffix, and credits.
The text "Spring 2004" is the value of the semester attribute of the taken tag
8. On-line banking
If you have on-line banking, the bank may allow you to download your transaction information.
The format might say Quicken, Money, etc.
If you download the information, save it to a file, and look at it, you will probably see that it is in XML format.
9. Processing
10. Text processing
Old days (of programming):
text input from a file (sometimes CSV)
text output to a file (sometimes CSV)
New days (of programming):
XML input from a file (or JSON)
XML output to a file (or JSON)
11. End of page