Extensible Markup Language XML

  • Published on
    01-Jan-2016

  • View
    13

  • Download
    0

Embed Size (px)

DESCRIPTION

Extensible Markup Language XML. MIS 520 Database Theory Fall 2001 (Day) Lecture 14. Types of Databases. Data is facts and figures Database is a related set of data Kinds of databases Unstructured Meaning of data interpreted by user Semi-Structured - PowerPoint PPT Presentation

Transcript

<ul><li><p>Extensible Markup LanguageXMLMIS 520 Database TheoryFall 2001 (Day)Lecture 14</p></li><li><p>Data is facts and figuresDatabase is a related set of dataKinds of databasesUnstructured Meaning of data interpreted by userSemi-StructuredStructure of data wrapped around dataStructuredFixed structure of dataData added to the fixed structureTypes of Databases</p></li><li><p>XML is a text based markup language that is fast becoming a standard of data interchangeAn open standard from W3CA direct descendant from SGML</p><p>Example: Product Inventory DataRefrigeratorR3456d2hGeneral Electric1290.001200</p><p>XML</p></li><li><p>XMLs key role is data interchangeTwo business partners want to exchange customer dataAgree on a set of tagsExchange data without having to change internal databasesOther business partners can join in the exchange by using the tagsetNew tags can be added to extend the functionalityData InterchangeKey to successful data interchange is building consensus and standardizing of tag sets</p></li><li><p>TCP/IP Universal NetworkingHTML Universal RenderingJava Universal CodeXML Universal Data</p><p>Numerous standard bodies are set up for standardization of tags in different domainsebXMLXBRLMMLCMLXML = Universal Data</p></li><li><p>Both are markup languagesHTML has fixed set of tagsXML allows user to specify the tags based on requirementsUsageHTML tags specify how to display dataXML tags specify semantics of the data Tag InterpretationHTML specifies what each tag and attribute meansXML tags delimit data &amp; leave interpretation to the parsing applicationWell formednessHTML very tolerant of rule violations (nesting, matching tags)XML very strictly follows rules of well formedness</p><p>HTML vs. XML</p></li><li><p>PrologInstructs the parser as to what it it parsingContains processing instructions for processorBodyTags- EntitiesAttributes- Properties of EntitiesComments- Statements for clarification in the documentExample Prolog</p><p>SanjayGoel Body56 Della StreetPhoenixAZ15784</p><p>Structure of XML</p></li><li><p>Contains eclaration that identifies a document as xmlVersionVersion of XML markup language used in the dataNot optional EncodingIdentifies the character set used to encode the dataDefault compressed Unicode: UTF-8StandaloneTells whether or not this document references external entityMay contain entity definitions and tag specificationsProlog</p></li><li>Uses less-than and greater-than characters () as delimiters Every opening tag must having an accompanying closing tag SanjayEmpty tags do not require an accompanying closing tag.Empty tags have a forward slash before the greater-than sign e.g. Tags can have attributes which must be enclosed in double quotes</li><li><p>XML documents have a tree structure containing multiple levels of nested tags. Root element is a single XML element which encloses all of the other XML elements and data in the documentAll other elements are children of the root element</p><p> Root ElementSanjayGoel56 Della Street Child ElementsPhoenixAZ15784</p><p>Tree Structure - Elements</p></li><li><p>AttributesAttributes are properties associated with an elementEach attribute is a name value pair No element may contain two attributes with same nameName and value are strings</p><p>Example Attributes56 Della Street Nested ElementsPhoenixAZ15784</p></li><li><p>Data should be stored in ElementsInformation about data (meta-data) should be stored in attributesWhen in doubt use elementsRules of thumbElements should have information which some one may want to read.Attributes are appropriate for information about document that has nothing to do with content of document e.g. URLs, units, references, ids belong to attributesWhat is your meta-data may be some ones dataElements vs. Attributes</p></li><li><p>XML comments begin with All data between these delimiters is discarded</p><p>Comments should not come before XML declarationComments can not be placed inside a tagComments may be used to hide and surround tags</p><p>Sanjay Last tag is ignored</p><p>-- string may not occur inside a comment except as part of its opening and closing tag IllegalComments</p></li></ul>

Recommended

View more >