XML An Overview - PowerPoint PPT Presentation

About This Presentation
Title:

XML An Overview

Description:

Markup languages 'markup' text (data) so that one string of text can be ... XML is being referred to as the Rosetta Stone of networked computing! ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 24
Provided by: roge104
Category:
Tags: xml | overview | rosetta

less

Transcript and Presenter's Notes

Title: XML An Overview


1
XMLAn Overview
XBRL Workshop, August 2006
  • Roger DebrecenyUniversity of Hawaii
  • Skip WhiteUniversity of Delaware

2
XMLThe eXtensible Markup Language
3
Markup languages
  • What is a markup language?
  • Markup languages markup text (data) so that one
    string of text can be distinguished from another!
  • What does the following mean?
  • 141 68 7.5

4
XML
  • Markup language
  • Could be anything space, comma, tab ,
  • Need agreement on the markup!
  • eXtensible
  • Able to extend
  • Need agreement on the markup rules!
  • ltweightgt 141 lt/weightgt
  • ltheightgt 68 lt/heightgt
  • ltshoeSizegt 7.5 lt/shoeSizegt

5
HTML
  • HyperText Markup Language
  • An agreed-on language for creating Web pages
  • A fixed set of tags as markup
  • ltheadgt
  • lttitlegt My Web Page lt/titlegt
  • lt/headgt
  • ltbodygt
  • ltcentergt Hello Welcome to my Web page!
    lt/centergt
  • lt/bodygt
  • Tells a browser how to display things!

6
XML - markup for documents
  • The markup rules syntax that all well-formed
    XML documents must follow
  • One and only one root element
  • All elements must be properly nested
  • All non-empty elements must have the same
    beginning and ending tag names (case-sensitive)
  • Elements can contain data items or other elements
    (mixed is considered bad form)
  • All elements can contain attributes

7
XML Elements
  • The basic unit of all XML documents is the
    element
  • A root element
  • Is the master element the overall container
  • Its name tells what the document is all about
  • Simple elements contain data values and do not
    have attributes
  • ltIdNumbergt 12345 lt/IdNumbergt
  • Complex elements have attributes and/or other
    elements nested within
  • ltWeight unitsOZSgt12.00lt/Weightgt
  • ltInventoryItemgt
  • ltIdNumbergt12345lt/IdNumbergt
  • ltWeight unitsOZSgt12.00lt/Weightgt
  • lt/InventoryItemgt

8
XML document (part 1)
  • ltSalesOrdergt
  • ltCustomerInformationgt
  • ltCustomerNumbergt12345lt/CustomerNumbergt
  • ltAddress typeshipping sameAsbillinggt
  • ltFirstNamegtSkiplt/FirstNamegt
  • ltLastNamegtWhitelt/LastNamegt
  • ltStreetAddress1gt 1234 Main Street
    lt/StreetAddress1gt
  • ltStreetAddress2gtlt/StreetAddress2gt
  • ltCitygt Newark lt/Citygt
  • ltStategt DE lt/Stategt
  • ltZipCodegt 19716 lt/ZipCodegt
  • ltCountrygt USA lt/Countrygt
  • lt/Addressgt
  • ltAddress typebilling sameAsshipping/gt
  • lt/CustomerInformationgt

9
XML document (part 2)
  • ltOrderInformationgt
  • ltOrderNumbergt111lt/OrderNumbergt
  • ltOrderDategt2006-08-02lt/OrderDategt
  • ltCreditCard type"VISA"gt
  • ltCardHolderNamegt Skip Whitelt/CardHolderNamegt
  • ltCardNumbergt 1234567891011213lt/CardNumbergt
  • ltExpirationDategt 2009-05lt/ExpirationDategt
  • lt/CreditCardgt
  • ltItemgt
  • ltItemIdgtsrh123lt/ItemIdgt
  • ltItemDescriptiongt Specialized RH Mountain
    Bike
  • lt/ItemDescriptiongt
  • ltSize units"in"gt19lt/Sizegt
  • ltQuantityOrderedgt 1lt/QuantityOrderedgt
  • ltSalePrice units"USD"gt
    550.00lt/SalePricegt
  • lt/Itemgt
  • lt/OrderInformationgt

10
XML documents
  • What can we say about XML documents?
  • XML documents are made up of tags (markup) that
    add meaning/context to data items
  • A pair or tags and its content is known as an
    element
  • XML elements can contain attributes within the
    beginning tag attributes add meaning!
  • The XML attribute format is attributeNamevalue
  • XML documents are structured in a strict
    hierarchy
  • Well-formed XML documents can be processed by an
    XML processor

11
XML Documents
  • Why are XML documents so popular for storing and
    transforming information on networks?
  • Easy to create understand
  • Contain data with meaning context
  • Processing data as information
  • Very efficient for computers to process
  • A standardized and non-proprietary language

12
XML Fundamentals
  • XML documents are hierarchical
  • Structured as tree-like hierarchies
  • XML documents are self-describing
  • Each piece of data (information) has descriptive
    information associated with it
  • XML is directly usable over the Internet
  • Designed for storing delivering information
  • XML does not currently replace HTML
  • XML describes the content while in most cases
    HTML is used to tell a browser how to display it

13
Information in XML Documents
  • So What do you have when you have information
    in XML documents?
  • You have information that can be understood by
    humans as well as ANY COMPUTER APPLICATION!!!
  • XML is being referred to as the Rosetta Stone of
    networked computing!
  • The transfer of information between computer
    applications and between computers and humans
    will become much more intelligible and automatic

14
XML specifications
  • XML is a set of rules and syntax for creating XML
    documents and specifications (stds.) that extend
    the capabilities of XML
  • XML documents are used to store and transfer
    structured data over computer networks
  • XML specifications extend the basic rules of XML
    to create languages vocabularies to be used to
  • Define the contents structure of XML documents
  • Process XML documents
  • Create languages to support XML document
    processing

15
XML Specifications
  • XML Schema language
  • To define the allowable contents structure of
    XML documents to create additional XML specs.
  • XML Namespaces (xmlns)
  • A collection of element names attributes for a
    particular purpose - like business reporting
    they help to avoid naming collisions!
  • XML Linking Language (XLink)
  • Attributes to be used to define sophisticated
    links between networked resources
  • XBRL a special purpose XML vocabulary!

16
XML namespaces
  • The naming collision problem
  • What if within your company, you have an
    accounting department a shipping department and
    they each want to use the XML element name
    status to mean things uniquely relevant to
    them?
  • In accounting, status is used to mean billed or
    not!
  • In shipping, status is used to mean shipped or
    not!

17
XML namespaces
  • The solution
  • Create a separate namespace for each department
    within each namespace, define the element name
    status
  • myCompany.com/xml/accounting
  • Preferred namespace prefix acct
  • ltstatusgt billed (notBilled) lt/statusgt
  • myCompany.com/xml/shipping
  • Preferred namespace prefix ship
  • ltstatusgt shipped (notShipped) lt/statusgt

18
XML namespaces in XML docs.(a sales order status
report)
  • ltSalesOrderStatus
  • xmlnsaccthttp//myCompany.com/xml/accounti
    ng
  • xmlnsshiphttp//myCompany.com/xml/shipping
    gt
  • ltOrderNumbergt 12345 lt/OrderNumbergt
  • ltOrderDategt 2006-08-02lt/OrderDategt
  • ltshipStatusgt shipped lt/shipStatusgt
  • ltacctStatusgt notBilled lt/acctStatusgt
  • lt/SalesOrderStatusgt

19
XML Namespaces
  • XML namespaces
  • Contain a collection of elements attributes for
    a particular purpose
  • In XML documents
  • Namespaces must be declared using the xmlns
    attribute (usually declared in the root element)
  • xmlnsprefixhttp namespace URI
  • After declaration, a namespace prefix can be
    appended to an element or an attribute
    designates that it was defined in a particular
    namespace (for a particular purpose)
  • ltus-gaap-ciCurrentAssetsgt10000lt/us-gaap-ciCurren
    tAssetsgt

20
XLink language
  • The XML XLink language
  • A link is an explicit relationship between any
    addressable resources information or services
  • The XLink specification defines a set of
    attributes that can be used with any XML element
    to create explicit relationships
  • Simple links (commonly seen on Web pages) are
    unidirectional from a source to a target doc.
  • Extended links are two-way and multidirectional
    and can describe relationships

21
Xlink language
  • XLink is used heavily in the XBRL specification
    ( in XBRL documents)
  • To link a taxonomy to an XBRL instance document
  • ltlinkschemaRef xlinktypesimple
    xlinkhrefus-gaap-ci-2005-02-28.xsd/gt
  • ltus-gaap-ciCurrentAssetsgt10000lt/us-gaap-ciCurren
    tAssetsgt
  • To define relationships between facts reported in
    an XBRL instance document
  • To create linkbases to provide additional
    information about accounting concepts in instance
    documents

22
Summary Introduction to XML
  • XML is a set of rules and syntax for creating XML
    documents and specifications (stds.) that extend
    the capabilities of XML
  • XML documents are used to hold and transfer
    structured data over computer networks
  • XML specifications extend the basic rules of XML
    to create languages vocabularies
  • XML Namespaces
  • XML XLink language
  • XML Schema language
  • XBRL a special purpose XML vocabulary

23
Reference material
  • W3C Schools XML tutorial http//www.w3schools.c
    om/xml/default.asp
  • W3C Schools HTML tutorial http//www.w3schools.
    com/html/default.asp
  • HTMLHelp.com HTML references tutorials
    http//www.htmlhelp.com/
Write a Comment
User Comments (0)
About PowerShow.com