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, Formatting Tags, Linking,, and Data Input Tags,
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 by Example Sean McGrath Prentice Hall, Inc Building E-commerce Applications with XML Book Title: XML by Example Author: Sean McGrath Publisher: Prentice Hall, Inc. Date Published: 1999 Description: Building E-commerce Applications
Namespaces Namespaces resolve ambiguous element tag names, in order to associate correct elements in an XML document.
Namespaces OrderInfo.xml John Dow 19 Footlong Court Tallwood Cigars BillingInfo.xml Angela Dow Visa 12344
Namespaces: Explicit <order: Order_Info xmlns:order =” xmlns:bill=“ > John Dow 19 Footlong Court Tallwood Cigars Angela Dow Visa 12344
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
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
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....
Example xsl:for-each select="student_list/student"> Name: ID: Studying :
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 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 Advantages of Web Services –Component independence –Component based –XML based interfaces