Presentation is loading. Please wait.

Presentation is loading. Please wait.

Extensible Markup Language

Similar presentations


Presentation on theme: "Extensible Markup Language"— Presentation transcript:

1 Extensible Markup Language
XML

2 Markup Languages What does this number (100) mean?
Actually, it’s just a string of characters! A markup language can be used to distinguish this string of characters from other strings and to add some meaning to it A markup language is simply a computer language of codes and tags (a.k.a. containers) <weight>100</weight>

3 The HTML code used to make web pages indicates how data should be DISPLAYED.
<b><u>Text that is bold and underlined</u></b> <h1>Large font size</h1> <ul><li>Text that is in a bulleted list</li></ul> HTML does not tell you what the data actually is. XML indicates what the data really is. It provides context for the data being transmitted. <weight>150</weight> <price>$100</price> <color>Blue</color> Data provided about data XML=eXtensible Markup Language. Users can create their own tags (unless you are mandated to use certain, specified tags)

4 The Machine is Us/ing Us

5 XML adds meaning or context to the data that is being transmitted.
<weight>100</weight> XBRL (eXtensible Business Reporting Language) is a specific XML schema that describes the elements/data in financial statements.

6 How Would You Describe A building at KSU A person
Name Location When Built Architect Primary College Using the Building A university in the Big 12 City State Mascot Abbreviation Color (primary school color) A person Last Name First Name Age Gender Hair Color Weight Height Birthdate College Major

7 (an XML instance document)
<?xml version=“1.0”?> <SelectedBig12Universities> <University> <name>Kansas State University</name> <city>Manhattan</city> <state>Kansas</state> <mascot>Wildcat</mascot> <abbreviation> KSU</abbreviation> <color> Purple</color> </University> <name> University of Kansas</name> <city>Lawrence</city> <mascot> Jayhawk </mascot> <abbreviation> KU</abbreviation> <color> Blue</color> </SelectedBig12Universities>

8 SelectedBig12Universities
Instance Document Abbreviation Color Name City State Mascot Abbreviation Color Color Abbreviation Name City State Mascot Name City State Mascot University University University Root element: Selected Big 12 Universities Mid-level elements: individual universities Individual data content SelectedBig12Universities A tree hierarchy that describes the overall data content

9 Core XML Technologies The XML Instance document XML Schemas
Stores data in a hierarchical format XML Instance documents are the heart of XML. XML Schemas Defines the structure of a valid XML instance document and the types of values that elements may hold. XML Schemas are used to validate the XML instance documents. Someone who has your schema knows what the information that you will be sending them or exchanging with them will look like. XSL (the extensible Stylesheet Language) Describes how the XML data should be displayed Used to convert an XML instance document from one format to another. Some of the formatting can be undertaken using HTML.

10 An XML Instance Document
<?xml version=“1.0”?> <SelectedBig12Universities> <University> <name>Kansas State University</name> <city>Manhattan</city> <state>Kansas</state> <mascot>Wildcat</mascot> <abbreviation> KSU</abbreviation> <color> Purple</color> </University> <name> University of Kansas</name> <city>Lawrence</city> <mascot> Jayhawk </mascot> <abbreviation> KU</abbreviation> <color> Blue</color> </SelectedBig12Universities> Follows a hierarchical format that you can expand or collapse Link

11 Inventory Schema A description of the rules that “valid” XML instance documents must follow. Applications that understand a schema know what to expect and can process any associated, valid documents. Schemas define the content, organization, and structure of valid instance documents.

12 Used to format instance documents
The XSL Stylesheet <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl=" version="1.0"> <xsl:template match = "/"> <HTML> <TABLE BORDER = "1"> <xsl:for-each select="inventory/item"> <TR> <TD> <xsl:value-of select="."/> </TD></TR> </xsl:for-each> </TABLE> </HTML> </xsl:template> </xsl:stylesheet> Used to format instance documents

13 5 row, 4 column table with multiple cells
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl=" version="1.0"> <xsl:template match = "/"> <HTML> <TABLE BORDER = "1"> <TR> <TH>Item</TH> <TH>Cost</TH> <TH>QOH</TH> <TH>TOTAL</TH></TR> <xsl:for-each select="inventory/item"> <TD> <xsl:value-of select="name"/> </TD> <TD> <xsl:value-of select="cost"/> </TD> <TD> <xsl:value-of select="qoh"/> </TD> <TD> <xsl:value-of select="cost * qoh"/> </TD></TR> </xsl:for-each> </TABLE> </HTML> </xsl:template> </xsl:stylesheet> 5 row, 4 column table with multiple cells XSL Stylesheet

14 XML Summary Extensible Markup Language
HTML was designed to display data and to focus on how data looks. XML was designed to describe data and to focus on what data is. XML Technologies Instance documents hold data. Schemas define valid documents (what they look like and what they must contain) Stylesheets describe how to format the data. XML is the new foundation/standard for exchanging business documents electronically.

15 Example of Instance Document Coding


Download ppt "Extensible Markup Language"

Similar presentations


Ads by Google