Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML: Overview MIS 181.9: Service Oriented Architecture 2 nd Semester, 2011-2012.

Similar presentations


Presentation on theme: "XML: Overview MIS 181.9: Service Oriented Architecture 2 nd Semester, 2011-2012."— Presentation transcript:

1 XML: Overview MIS 181.9: Service Oriented Architecture 2 nd Semester, 2011-2012

2 Markup Language ► Use of tags ► HTML ► Use of pre-defined tags for formatting ► XHTML ► Modified HTML ► XML ► No pre-defined tags

3 Separation of Data and Presentation ► XML contains data ► Content ► Structure ► No display instructions

4 Sample Charlie and the Chocolate Factory Dahl Roald Penguin Books $12.95 Fiction Paperback 0394910117

5 Advantages ► Extensible ► Open ► Nonproprietary

6 Limitations ► Not a database ► Not a programming language

7 XML File ► Text file with the following contents: ► PROLOG ► XML Declaration ► ► Processing instructions ► Comments ► Document type declaration ► Root element ► Tags: Opening, closing ► Element instances ► Data ► Attributes

8 Document Model ► Special document ► Describes the structure, rules ► Used to validate a XML file ► Document Type Definition (DTD) ► XML Schema Definition (XSD)

9 <!ATTLIST customer custType (newRetail | prevRetail | newWholesale | prevWholesale) #REQUIRED>

10 DTDs ► Defines the ELEMENTs, ATTributes for each element in a XML document ► Can be found within a XML document OR as a separate file ► XML file should include the following in the prolog ► Internal: <!DOCTYPE books [... ]> ► Separate:

11 XSD: Another Document Model ► DTDs: better if your XML file contains mainly text data ► What if the XML file has different types of data? ► XML files with large amounts of data and varying data types could be better validated with XML Schemas

12 XSD example

13 XML at Work 1. XBRL ( http://xbrl.org ) – Financial Statements http://xbrl.org 2. NewsML ( http://www.iptc.org ) - News http://www.iptc.org 3. MusicXML ( http://www.musicxml.org/xml.html ) – Musical scores http://www.musicxml.org/xml.html 4. SHML (Structured Health ML) ( http://mlp-xml.sourceforge.net/words/Med_kB_lex.html ) – medical diagnoses and treatments http://mlp-xml.sourceforge.net/words/Med_kB_lex.html Provides standards for exchanging and processing data

14 Well-formed XML files ► Only one document element ► Every open tag must be closed ► If element is empty, it has to be closed ► Elements must be properly nested ► Tag and attribute names are case sensitive ► Attribute values must be enclosed on single/double quotes

15 XML and Web Services ► Web Services: application components that allow interoperability ► Web Services platform elements ► SOAP (Simple Object Access Protocol) ► XML-based protocol used to exchange information via HTTP ► Communication protocol ► UDDI (Universal Description, Discovery and Integration) ► Directory for storing web services; communicates via SOAP ► WSDL (Web Services Description Language) ► XML-based language for describing web services


Download ppt "XML: Overview MIS 181.9: Service Oriented Architecture 2 nd Semester, 2011-2012."

Similar presentations


Ads by Google