Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML Example: a datafile Ed Gogol John Smith Elements have an opening tag, for example and a closing tag, for example. Person is the element name. Everything.

Similar presentations


Presentation on theme: "XML Example: a datafile Ed Gogol John Smith Elements have an opening tag, for example and a closing tag, for example. Person is the element name. Everything."— Presentation transcript:

1 XML Example: a datafile Ed Gogol John Smith Elements have an opening tag, for example and a closing tag, for example. Person is the element name. Everything within the opening and closing tag pertains to that instance of the element. Note how the Person element contains the FirstName and LastName elements.

2 XML Isn’t Positional: “White Space” is ignored This: Ed Gogol John Smith Is the same as this: Ed Gogol John Smith Is the same as this: Ed Gogol John Smith

3 Data Values can get as large as they need to be – there is no inherent limit: Ed Gogol John Smith-Jones-Doe-Roe-Hastings-Michaels-George- Mom-Dad-Sis-Brother-Mommy-Daddy-Brown-Okay If a field needs to expand, it simply expands. This is in stark contrast to the hassles associated with expanding standard positional-format records.

4 If you need to add a new element, you simply add it: Ed Martina Gogol John Smith Likewise, in stark contrast to the hassles associated with expanding standard positional-format records. In this case the MiddleName element is optional.

5 Elements can contain elements can contain elements – there’s no limit: Ed Martina Gogol Fido Bowser Slithery Python There’s no limit to the number of Pets a Person can have.

6 Numeric values can get as big (or as small) (or as negative) as they need: Kim Taylor 56000000 Ed Gogol -57.1768 No more hassles with assumed numbers of decimal positions, decimal locators, or reading “packed” fields.

7 Using “Attributes” for data values makes it simpler: With Elements Only: Kim Taylor 56000000 Ed Gogol -57.1768 With Elements and Attributes: Note how the /> at the end of the second Person eliminates the need for the closing tag.

8 XML (Extensible Markup Language) is nothing more (or less) than an impossibly flexible means of formatting data. Its flexibility is derived from its simplicity. And its power comes from its flexibility. You define your own XML Vocabulary for a particular purpose. For example: FIXML – FIX Protocol Markup Language MDDL – Market Data Definition Language FPML – Financial Products Markup Language SPANml – SPAN Markup Language Each XML vocabulary specifies the exact definition of the elements, the attributes, how they must be ordered, how they relate to each other, etc. The original means for specifying an XML vocabulary was a DTD (Data Type Definition) File. The newer and more powerful method is with a schema file. With a schema you can specify data types, etc.

9 All the major software companies – Sun, IBM, Microsoft, etc. – are deeply committed to XML as a revolutionary technology. There is a universe of tools out there for developers to use. It’s tremendously powerful (once you know how to use it.) Does it increase bandwidth? Not necessarily. You don’t waste space as you do with fixed-length fields. You can choose your attribute names and element names so the ones that are the most widely used are fairly small. It compresses very well. There are new features coming which allow the use of aliases rather than the full element or attribute name.


Download ppt "XML Example: a datafile Ed Gogol John Smith Elements have an opening tag, for example and a closing tag, for example. Person is the element name. Everything."

Similar presentations


Ads by Google