XML – Extensible Markup Language

  • Published on

  • View

  • Download

Embed Size (px)


XML Extensible Markup Language. Sivakumar Kuttuva & Janus z Zalewski. What is XML?. Extensible Markup Language (XML) is a universal standard for electronic data exchange - PowerPoint PPT Presentation


  • XML Extensible Markup LanguageSivakumar Kuttuva& Janusz Zalewski

  • What is XML?Extensible Markup Language (XML) is a universal standard for electronic data exchangeProvides a method of creating and using tags to identify the structure and contents of a document ignoring the formatting

  • How XML look like //Root Tag JavaProgramming //Element Course Name EECS //Element Dept Paul Ron Uma Lindsay

  • Why XML came into existence?(1)Make it easier to provide metadata -- data about information EECS Paul Thompson Here Name, Department are MetadataLarge-scale electronic publishing requires dynamic documents without changing document formats.Internationalized media-independent electronic publishing.

  • Why XML came into existence? (2)Allow industries to define platform-independent protocols for the exchange of data, especially the data of electronic commerce.Make it easy for people to process data using inexpensive software.

  • Two Types of Syntax StandardsXML documents must meet one of two syntax standards:Well-formed (the basic standard) Document must meet minimum,standard criteria.ValidDocument must be well-formed and adhere to a DTD (Document Type Definition).

  • Well-Formed XMLWell-formed criteria include:All elements have a start and end tag with matching capitalization. Proper element nesting.

    not Attribute values are in single or double quotes. Empty elements need an end or closed start tag. or

  • Why Well-Formed MattersGuarantees the documents syntax before sending it to an application.A clean syntax guarantee which means less ambiguity which results in faster processing.A well-formed violation is a fatal error.

  • Valid XMLTo be valid, a document must be well-formed and adhere to a DTD.A DTD Example is shown below

  • Valid XMLDTD - Document Type Definition specifies: Elements in the document.Author, Publisher Their attributes.For Book Author, Publisher, Price are attributes Whether they are mandatory or optional A DTD effectively specifies the documents grammatical rules.

  • A sample entry in the XML file adhering to the given DTD

    3456-34567890-3456 C++ Primer Tendulkar McGraw Hill 41.99

  • Why use DTDWell-formed means the document meets a minimum standard set of rules.A DTD helps to define user defined rules and languages provided the XML content adheres to the syntax standards like WML, MAML, etc.

  • The Components Line 1

    Bookcatalog is the root element.Bookcatalog can have one or more (indicated by the +) Book elements.

  • The Components Line 2

    Each Book element can contain:A title, author, publisher, price

  • The Components Line 4

  • The Components Lines 5-9The Remaining Elements Title through Price are #PCDATAParseable character data that the processor will check for entities and markup charactersAny , or & in data specified as PCDATA must be represented by < or > or &.

  • SchemasThe next step beyond DTDsCome from the database worldMore powerful and extensible than DTDs, which come from the SGML worldSchemas are XML documents, so they:Are extensibleUse XML syntax unlike DTDsSupport data types like dates, times, currencies, important in eCommerce

  • DTDs vs SchemasWhy use schemas?More powerful than DTDsBetter suited for eCommerce.Why use DTDs?Wider tool support.More examples available for use and reference.HTML, XHTML, CALS, etc.Greater depth of experience in the industryWider pool of developers

  • CSS and XMLCSS was designed for HTML but works fine under XML as well.Rather than create an XSL style sheet, you can create a simpler CSS and attach it to a XML document via a command like:{?xml-stylesheet href=mycss.css type=text/css?}

  • CSS and XSLXML uses custom tags that a browser does not know how to displaySo XML documents may display like this 3456-34567890-3456 C++ Primer Tendulkar McGraw Hill 41.99

    Legibility requires applying styles: CSS XSL

  • XSL (Extensible Style Language)XSL comes from DSSSL (Document Style Semantics and Specification Language), the SGML style language, derived from LISP.

  • Benefits of XSLAn XSL style sheet is well-formed XML.Supports a style sheet DTD for validation.Far greater processing ability than CSS.XSL Transformations (XSLT) take part of an XML document and transform it, such as XML to HTML. This is why XML appears to be the route tosingle-sourcing.

  • Advanced Features of XMLXlink XpointerParsing XML with DOM(Document Object Model)XPath

  • XML ApplicationsApplications that require the Web client to mediate between two or more heterogeneous databases like information tracking system for a home health care agency. Applications that attempt to distribute a significant proportion of the processing load from the Web server to the Web client like technical data delivery system for a wide range of products.Applications that require the Web client to present different views of the same data to different users.Applications in which intelligent Web agents attempt to tailor information discovery to the needs of individual users.

  • Future Demands of XMLIntelligent Web agents would have demand for structured data User preferences must be represented in a standard way to mass media providers.


View more >