Presentation is loading. Please wait.

Presentation is loading. Please wait.

22 April 041 XML: An Introduction What is XML? What is a well-formed XML document? This session will introduce you to XML by providing a brief history.

Similar presentations


Presentation on theme: "22 April 041 XML: An Introduction What is XML? What is a well-formed XML document? This session will introduce you to XML by providing a brief history."— Presentation transcript:

1 22 April 041 XML: An Introduction What is XML? What is a well-formed XML document? This session will introduce you to XML by providing a brief history of the protocol. Learn XML Syntax and work through examples to understand what constitutes a well formed XML document

2 22 April 042 Introduction to XML Jim Northey Jordan and Jordan Chair, FPL Global Derivatives Committee Chair, FPL Global Derivatives Committee

3 Making the Transition to FIXML 22 April 043 What is XML? It’s A Floor Wax!! It’s a Dessert Topping!! The BEST NEW thing since RDBMS’ and Objects!!!

4 Making the Transition to FIXML 22 April 044 What is XML? HistoryHistory Move beyond the closed markup language HTML to add semanticMove beyond the closed markup language HTML to add semantic eXtensible Markup LanguageeXtensible Markup Language –Open ended mark up language XML is a Meta markup languageXML is a Meta markup language –Markup language used to create other markup languages Just like HTML uses Tags to organize dataJust like HTML uses Tags to organize data –The tags describe the content of the message Self describing dataSelf describing data –Description of the message with the message provides for considerable flexibility SGML HTML XML XHTML 1994 1998 1999 1980s

5 Making the Transition to FIXML 22 April 045 Driving force behind XML W3C - World Wide Web Consortium http://www.w3c.orgW3C - World Wide Web Consortium http://www.w3c.orghttp://www.w3c.org –founded in October 1994 to lead the World Wide Web to its full potential by developing common protocols that promote its evolution and ensure its interoperability. Today, W3C has over 450 Members and nearly 70 full-time staff around the world who contribute to the development of W3C specifications and software. –http://www.w3.org/Consortium/Points/ http://www.w3.org/Consortium/Points/

6 Making the Transition to FIXML 22 April 046 HTML - A Closed Markup Language Futures Industry Association - The FIA is the only association representative of all organizations that have an interest in the futures market. <BODY BGCOLOR="#333333" ALINK=#000000 VLINK=#E9E7A7 LINK=#E9E7A7 TOPMARGIN=0 LEFTMARGIN=0 RIGHTMARGIN=0 BOTTOMMARGIN=0 MARGINHEIGHT=0 MARGINWIDTH=0> www.futuresindustry.org FUTURES INDUSTRY ASSOCIATION... The Futures Industry Association and the Futures Industry Institute. Futures, Markets, Volume, CFTC, SEC, Trade, Show, Boca, Electronic, Trading, Expo, Exhibit, Education, Optech, Market, Commission, Merchant, Finance, FCM, Commodities, Commodity, Trading, Advisor, CTA, Derivatives, Risk, Management, Options, Hedge, Trading, y2k, FII, FIA, De-regulation, Regulation, Contract, Specifications, Clearing, Series, 31, 32, 33, Alternative, Investments, Ethics, Factbook, Data, Investor, Managed

7 Making the Transition to FIXML 22 April 047 A note on terminology In this presentation “ XML Message ” and “ XML Document ” are used interchangeablyIn this presentation “ XML Message ” and “ XML Document ” are used interchangeably

8 Making the Transition to FIXML 22 April 048 Quick Overview on XML An XML Document or Message is made up of ElementsAn XML Document or Message is made up of Elements Elements are composed ofElements are composed of –All tags contain a name –An Opening Tag –optional attributes –optional content –A Closing Tag Elements can be emptyElements can be empty –Meaning the Opening Tag can be terminated with a backslash character Elements are nestedElements are nested –Elements can contain other elements containing other elements …. –Forms a tree of information White space is ignored with the exception of the information between the element opening tag and closing tagWhite space is ignored with the exception of the information between the element opening tag and closing tag this is the data for this element Customer Unknown

9 Making the Transition to FIXML 22 April 049 Well Formed XML Messages There are only a handful of rules that need to be followed to create XML messagesThere are only a handful of rules that need to be followed to create XML messages XML messages that follow the simple rules are considered to be:XML messages that follow the simple rules are considered to be: Well Formed XML Messages Well Formed Messages are good A Well Formed XML document is not to be confused with a Valid XML document

10 Making the Transition to FIXML 22 April 0410 Anatomy of an XML Message 12345 EK 10000 XML Declaration Root Element Value Opening Tag Empty Tag Attribute Attribute Value Closing Tag Nested Elements What’s This? Element

11 Making the Transition to FIXML 22 April 0411 XML Declaration First line in XML documentFirst line in XML document Delimited by Delimited by Three properties that you can setThree properties that you can set –version Always use this propertyAlways use this property There is only one version now “1.0”There is only one version now “1.0” –encoding Use if you require support of an alternative character setUse if you require support of an alternative character set Usually not neededUsually not needed Default character set is UTF-8, which is the ~ASCII part of UnicodeDefault character set is UTF-8, which is the ~ASCII part of Unicode –standalone Use this property to tell an XML processor if there are other files required to process this XML documentUse this property to tell an XML processor if there are other files required to process this XML document Valid values “yes” or “no”Valid values “yes” or “no”

12 Making the Transition to FIXML 22 April 0412 Elements Have an Opening Tag and a Closing TagHave an Opening Tag and a Closing Tag XML Elements are nested - into a tree structureXML Elements are nested - into a tree structure The outer most (top level) element is called the Root ElementThe outer most (top level) element is called the Root Element Content for the element is contained between the Opening Tag and the Closing TagContent for the element is contained between the Opening Tag and the Closing Tag Tag names (element names)Tag names (element names) –cannot have embedded spaces or punctuation characters other than - and _ –are case sensitive

13 Making the Transition to FIXML 22 April 0413 Attributes Can be added to the Opening Tag of an ElementCan be added to the Opening Tag of an Element name=“value” or name=‘value’ formatname=“value” or name=‘value’ format White space ignoredWhite space ignored –name = ‘value’ No embedded spaces or punctuation in an attribute nameNo embedded spaces or punctuation in an attribute name –except “-” and “_” IMHO: Think of elements as objects, think of attributes as urrrr..., well attributes of the objects (elements)IMHO: Think of elements as objects, think of attributes as urrrr..., well attributes of the objects (elements) –Sometimes objects contain other objects (elements) –Sometimes they just have attributes (data elements, member variables) –In fact the ISO 15022 Working Group 10 creating ISO/XML uses object modeling (UML) to create their XML definitions

14 Making the Transition to FIXML 22 April 0414 Defining our own XML Message 100 80.00 20020130 John Doe 102435 ABC-1453-20020130 SSB Is this Well Formed???

15 Making the Transition to FIXML 22 April 0415 Defining our own markup languages We said earlier that XML is a meta markup languageWe said earlier that XML is a meta markup language XML is used to create domain specific markup languagesXML is used to create domain specific markup languages How do we agree upon a dialect and then share this with others?How do we agree upon a dialect and then share this with others? How do we know if an XML message complies with our XML dialect (a *ML if you will) ?How do we know if an XML message complies with our XML dialect (a *ML if you will) ? There has to be …There has to be … –some mechanism we can use to describe our particular markup language (be it FIXML, FpML, JimML, EdML, MathML, AgXML, …) –some way to share this description of our *ML –some way automate the process of making sure an incoming XML message is a valid *ML message Good News There Is!!!!

16 Making the Transition to FIXML 22 April 0416 Describing XML Messages Document Type Definitions (DTDs)Document Type Definitions (DTDs) XML SchemaXML Schema Relax NGRelax NG … The Bad News is there is more than one way!

17 Making the Transition to FIXML 22 April 0417 Describing XML Messages Document Type Definitions (DTDs)Document Type Definitions (DTDs) –Provided with the original definition of SGML as defined by Goldfarb –Think of DTD statements as control statements for defining XML documents –DTD statements are not really XML statements –Cannot use XML tools to manipulate DTD statements –Some consider the DTD statements as a separate language In practice it is a separate language though it is a fundamental part of XMLIn practice it is a separate language though it is a fundamental part of XML XML SchemaXML Schema –An XML based language for defining XML documents –Permits manipulation of the schema using standard XML tools –This is like defining the database schema in tables in a relational database –A recursion...

18 Making the Transition to FIXML 22 April 0418 <Order ID="123456" Side="1" TxnTm="2003-12-18T12:00:00" Typ="2" Px="85.00"> <Hdr TID="SSB" SID="FCM" SeqNum="1" Snt="2003-12-18T12:00:00"/> A Very Simple Order in FIXML Schema Version

19 Making the Transition to FIXML 22 April 0419 Example Allocation Report Example courtesy Lisa Taikitsadaporn [tai@brookpath.com] and Nikhil Bose [AssistSoft@yahoo.com]

20 Making the Transition to FIXML 22 April 0420 Another Order Example <Order ID="123456" Side="2" TxnTm="2001-09-11T09:30:47-05:00" Typ="2" Px="93.25" Acct="26522154"> <Hdr Snt="2001-09-11T09:30:47-05:00" PosDup="N" PosRsnd="N" SeqNum="521" SID="AFUNDMGR" TID="ABROKER"/> Example courtesy Nikhil Bose (AssistSoft)

21 Making the Transition to FIXML 22 April 0421 Resources on the web XML Tutorials: http://www.zvon.orgXML Tutorials: http://www.zvon.orghttp://www.zvon.org XML Tutorials and Specifications: http://www.w3c.orgXML Tutorials and Specifications: http://www.w3c.orghttp://www.w3c.org XML General: http://www.xml.comXML General: http://www.xml.com XML plus general IT coverage: http://www.informIT.comXML plus general IT coverage: http://www.informIT.comhttp://www.informIT.com


Download ppt "22 April 041 XML: An Introduction What is XML? What is a well-formed XML document? This session will introduce you to XML by providing a brief history."

Similar presentations


Ads by Google