UB Computer Science and Engineering logo

Extensible Markup Language (XML)

Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards.

Example

Suffix your XML pages with file extension: .xml. Set their permissions to be world-readable (chmod 644). A minimal hello.xml says, "Hello, World!".

<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/css" href="hello.css" ?>

<root>
  <title>Hello, World! (XML)</title>
  <ostrich>Hello, World!</ostrich>
</root>

Create a Cascading Style Sheets (CSS) style rules file to apply to the example: (hello.css)

title {
  display:block;
  text-align:center;
  font-size:3.0em;
  font-weight:bold;
}

container {
  display:block;
  text-align:center;
  font-size:1.0em;
  color:#660000;
  background-color:#cccccc;
}

References

  1. https://en.wikipedia.org/wiki/XML
  2. w3schools.com XML Tutorial

This page last modified: Mon, June 25, 2018 16:37:35

Send your comments to: cse-webmaster@buffalo.edu

© 2024 University at Buffalo. All rights reserved. | Privacy | Accessibility