XML
This presentation is the property of its rightful owner.
Sponsored Links
1 / 17

XML PowerPoint PPT Presentation


  • 59 Views
  • Uploaded on
  • Presentation posted in: General

XML. BIS4430 – unit 10. XML Origins. Extensible Markup Language (XML) 1998 Inspired by Standard Generalized Markup Language (SGML) and HTML. SGML defines how any given markup language can be formally specified HTML combines markup from several categories: Text Structuring Tags <H1>,

Download Presentation

XML

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Xml

XML

BIS4430 – unit 10


Xml origins

XML Origins

  • Extensible Markup Language (XML) 1998

  • Inspired by Standard Generalized Markup Language (SGML) and HTML.

  • SGML defines how any given markup language can be formally specified

  • HTML combines markup from several categories: Text Structuring Tags <H1>,

  • Formatting Tags <B>, Linking <A>, <IMG>, and Data Input Tags <FORM>,<INPUT>


The key benefits of xml are

The key benefits of XML are:

· Readable by both humans and computers

· Facilitates the optimal structuring of data

· Free and/or inexpensive

· Widely available

· Easy to learn

· Supported by all major software vendors


Xml vs html

XML vs HTML

<P>Book</P><P>Title: XML by Example</P><P>Author: Sean McGrath</P><P>Publisher: Prentice Hall, Inc.</P>

<P>Date Published: 1999</P><P>Description: Building E-commerce Applications </P>

<book><title>XML by Example</title><author>Sean McGrath</author><publisher>Prentice Hall, Inc.</publisher><publish_date>1999</publish_date><description>Building E-commerce Applications with XML</description></book>


Namespaces

Namespaces

  • Namespaces resolve ambiguous element tag names, in order to associate correct elements in an XML document.


Namespaces1

Namespaces

OrderInfo.xml

<Order_Info>

<Name>John Dow</Name>

<Address>19 Footlong Court</Address>

<City>Tallwood</City>

<Order>Cigars</Order>

<Date>31-12-02</Date>

</Order_Info>

BillingInfo.xml

<Billing_Info>

<Name>Angela Dow</Name>

<Payment>Visa</Payment>

<Number>12344</Number>

</Billing_Info>


Namespaces explicit

Namespaces: Explicit

<order: Order_Info xmlns:order =”http://www.mdx.ac.uk/~ariel/order”

xmlns:bill=“http://www.mdx.ac.uk/~ariel/bill” >

<order:Name >John Dow</order:Name>

< order:Address>19 Footlong Court</ order:Address>

< order:City>Tallwood</ order:City>

< order:Order>Cigars</ order:Order>

< order:Date>31-12-02</ order:Date>

<bill:Billing_Info >

< bill:Name >Angela Dow</bill:Name>

< bill:Payment>Visa</ bill:Payment>

< bill:Number>12344</ bill:Number>

</ bill:Billing_Info>

</ order:Order_Info>


Xml parsers

XML Parsers

  • XML processor is used to read XML documents and provide access to their content and structure

  • It is assumed that an XML processor is doing its work on behalf of another module, called the application


Xml processing

XML Processing


Parsers

Parsers

  • Nonvalidating – they simply verify if the document adheres to rules of the XML syntax i.e. whether the XML document is well formed

  • Validating – these parsers read in XML documents, check if they are well formed and verify their compliance with a specified XML schema or other validation set, i.e. they verify if the XML document is valid.


Content access

Content Access


Converting xml with xslt

Converting XML with XSLT

  • XSL technologies allow to transform XML documents into various formats, such as PDF( Adobe Acrobat Reader), WML for wireless devices, and into HTML.


Retrieve the element content

Retrieve the element content

  • <xsl:value-of select="element name goes here"/>

  • <xsl:if test= "boolean-expression-goes here">....</xsl:if>

    <xsl:for-each select="element name goes here">

    <!--processing instructions go here-->

    </xsl:for-each>


Example

Example

xsl:for-each select="student_list/student">

<b>Name: </b><xsl:value-of select="name"/><p/><b>ID: </b><xsl:value-of select="student_ID"/><p/><b>Studying : </b><xsl:value-of select="major"/>

</xsl:for-each>


Database integration

Database Integration

  • XML Database Mapping

    • More description on next slide

  • Using Native XML Databases

    • Store XML data in XML document

    • Data is serialised


Xml database mapping

XML Database Mapping

  • Associate elements in an XML document with the relational database fields.

  • Query the database with SQL

  • Convert results into an XML document

  • Popular solution: Java & JDBC


Xml web services

XML Web Services

  • Advantages of Web Services

    • Component independence

    • Component based

    • XML based interfaces


  • Login