Introduction to XML. Chapter 133

Size: px
Start display at page:

Download "Introduction to XML. Chapter 133"

Transcription

1 Chapter 133 Introduction to XML A. Multiple choice questions: 1. Attributes in XML should be enclosed within. a. single quotes b. double quotes c. both a and b d. none of these c. both a and b 2. Which among the following is not applicable in XML? a. Attributes cannot contain multiple values. b. Tags are not case sensitive. c. Attributes cannot contain tree structures. d. There should always be a root element. b. Tags are not case sensitive. 3. The first line in a XML document is called a. a. preface b. prologue c. starter d. prefix b. prologue 4. The entity reference to define an apostrophe is. a. &phe b. & trophe c. &apos d. & apostrophe c. &apos 5. Which among the following is used to insert a comment in XML? a. <!-- --> b. // c. /* */ d. <comment> </comment> a. <!-- --> 6. Which among the following is not true for a Well Formed XML document? a. XML documents must have a root element. b. XML elements must have a closing tag c. XML tags are case sensitive d. XML documents should always have comments d. XML documents should always have comments 7. Is this a well formed XML document? <?xml version = 1.0?> <note> <to age = 29 > Tove </to> <from> John </from> a. Yes b. No c. Can t say d. None of these b. No 8. Validating an XML document refers to an XML document that is. a. well formed b. confirm to DTD c. both a and b d. none of these c. both a and b 58

2 9. The use of DTD in XML development is: a. required when validating XML documents b. no longer necessary after the XML editor has been customized c. used to direct conversion using the XSLT processor d. a good guide to populating a template to be filled in when generating an XML document automatically. a. required when validating XML documents 10. Valid XML document means a. the document has root element b. the document contains at least one or more root element c. the XML document has DTD associated with it and it complies with that DTD d. each element must nest inside any enclosing element properly c. the XML document has DTD associated with it and it complies with that DTD 11. Which of the following XML fragments are well formed? a. <element attribute=value> b. <element attribute= value > c. <element attribute=!value> d. <element attribute= value > b. <element attribute= value > 12. XML document can be viewed in a. word processor b. web browser c. notepad d. all of these d. all of these 13. How is an empty element defined in XML? a. <name></name> b. <name/> c. <name /> d. all of these d. all of these B. Fill in the blanks: 1. Every closing tag of an XML document is prefixed with / (slash). 2. The root element encloses all other elements in XML. 3. Empty elements are starting and closing tags without any content. 4. XML attributes are used to provide additional information about elements. 5. XML attributes should always be enclosed within quotes. 6. An XML parser is the component that deciphers the XML code. 7. Validator is a software that is used to check the syntax of a XML document. 8. Comments are remarks that are not part of the code but a part of documentation. 9. The entity reference for the greater than > symbol is &gt. 10. A tag within a tag is called a nested tag. C. State whether the following statements are true or false: 1. XML like HTML is not case sensitive. [False] 2. XML can be utilized to store information. [True] 3. It is possible to create your own tags in XML. [True] 59

3 4. You may have empty tags in XML. [True] 5. Every XML document may not have a root element. [False] 6. <message /> is a valid example of an empty tag. [True] 7. You may not enclose values for attributes of tags in quotes. [False] 8. You may have multiple values for an attribute. [False] 9. The first line is the XML declaration is called the prolog. [True] 10. It is not possible to provide comments in XML documents. [False] D. Answer the following questions: 1. What is XML? XML stands for extensible Markup Language (XML) which is a markup language that allows encoding of documents using a predefined set of rules which is both human-readable and machine-readable. 2. State three characteristics of XML. The three characteristics of HTML are: i. XML is extensible. It permits the client to make his own tags and record structure. ii. XML can be utilized to store information. Applications could be composed to store and recover data. iii. XML may be utilized to trade information. 3. State the differences between HTML and XML. Difference between HTML and XML: HTML HTML is used to display data and to focus on formatting of data. HTML tags are predefined. HTML tags may or may not have closing tags. (Container tags and Empty tags) HTML tags are not case sensitive. XML XML is used to describe data and focus on what data is. XML tags are not predefined. It is possible to create and define new tags as per your needs. XML tags must have a closing tag. (only container tags are allowed) XML tags are case sensitive. 4. What do you understand by the term XML element? XML elements are tags that forms a XML document. There are no predefined tags in XML unlike HTML. You need to define your own tags in XML. 5. XML tags are case sensitive explain the comment with the help of an example. XML tags are case sensitive unlike HTML tags which are not case sensitive. For example in HTML the tag <FONT> and <font> is one and the same. But in XML such tags are treated separately. Thus the tag <Message> is different from the tag <MESSAGE>. Also note that the opening and closing tags must be written with the same case. For example: <Message>This is incorrect</message> <MESSAGE>This is correct</ MESSAGE > 60

4 6. Explain with a help of an example how root elements are placed in a XML document. XML documents must contain one element that is the parent of all other elements. This element is called the root element. The root element encloses all other elements in XML. All other elements inside the root elements form the child element. The child element may again contain subchild elements and subsequently more nested elements may be inserted. The level of nesting may be extended up to any level. The structure of the XML file should look like this: <root> <child> <subchild>...</subchild> </child> </root> For example in case you need to store information of students (i.e., first name and last name) of a certain school using an XML document it should look like this: <school> <student> <serial> 1 </serial> <firstname> Shaahn </firstname> <lastname> Kohli </lastname> </student> <student> <serial> 2 </serial> <firstname> Subham </firstname> <lastname> Karki </lastname> </student> <student> <serial> 3</serial> <firstname> Rohit </firstname> <lastname> Agarwal </lastname> </student> </school> You can see in the above example that the root element declared out here is <school> then comes the child element <student> which in turn stores the <firstname> and <lastname> of the student in the tags. 7. What are empty XML elements? Give an example. An empty XML element document that is used to create a tag without any content. For example if the <message> tag is to be specified without any content. It is valid to write the tags as: <message></message> 61

5 It can be written like this as well: <message /> This sort of element syntax is called self-closing. 8. State the naming rules of XML elements. XML elements must follow these naming rules: Names can contain letters, numbers but no special characters. Thus <state1>, <sta1te>, and <topper5> are valid but <sta%te>, <tx,r> and <topper#> are invalid. Names cannot start with a number. Thus <1state> is invalid. Names cannot contain spaces. Thus <first name> and <last name> are invalid tags. Any name can be used, no words are reserved. 9. What are attributes in XML? XML attributes are used to describe XML elements, or to provide additional information about elements. As you have already seen that in HTML, attributes provide additional information about elements. For example: <BODY BGCOLOR= GREEN > You can see that the BGCOLOR attribute changes the background colour of the web page to GREEN. You can even create your own attributes in XML. The attribute values in XML must always be quoted, which may be either single or double quotes. For example in XML a person s sex, can be written as: <person sex= female > or written as: <person sex= female > 10. What is a XML prolog? A XML Prolog is the section at the beginning of an XML document which includes everything that appears before the document s root element. The XML declaration, the DOCTYPE and any processing instructions or comments may all be a part of it. Depending on your needs, you can choose to include both, either, or neither of these items in your XML document. 11. What are entity references? An entity reference is an alternative name for a series of characters. You can use an entity in the &name; format, where name is the name of the entity. There are some predefined entities in XML, furthermore you can declare entities in a DTD (Document Type Definition). There are 5 predefined entity references in XML: < < less then > > greater then & & ampersend &apso; apsotrophe " quotation mark 62

6 12. What is comme0.6nts used for? How are comments provided in a XML document? Comments are lines which are used for documentation and is completely ignored by the browser for interpretation always begins with <! and ends with --> 13. What is DTD? What are the two ways to define DTD? A Document Type Definition (DTD) is a file that defines the schema or structure of a document encoded in XML. A DTD can be declared inline inside an XML document, or as an external reference. 14. State the difference between SYSTEM and PUBLIC as used in DTD. The SYSTEM keyword is used when the XML and DTD resides in the same machine. The PUBLIC keyword is used when the DTD file is in the public domain. 15. State the significance of +, * and? symbols used after child elements in DTD. The + sign after a child element indicates that the child element occurs one or more times inside the element. The * sign after a child element indicates that the child element occurs zero or more times inside the element. The? sign after a child element indicates that the child element occurs zero or one time inside the element. 16. State the different attribute values that you can provide along with their usage. The attribute list declaration ensures that the XML document contains valid attribute list for an element. It has the general syntax: <!ATTLIST element-name attribute-name attribute-type attribute-value> element-name is the name of the element. attribute-name is the name of the attribute. attribute-type is the type of the attribute. Some common types used are : attribute-value may be one of the following: Common Attribute Type CDATA ID NMTOKEN ENTITY Meaning The value is character data. The value is a unique ID. The value is a valid XML name. The value. Value Value #REQUIRED #IMPLIED #FIXED value Explanation It is used to refer assing the default value of the attribute. It is used to indicate that it is complulsory to give the attribute. It is used to specify the fixed value for the attribute. It is used to specify the fixed value for the attribute. 17. What does Well Formed XML document mean? XML documents that abide by the syntax rules of XML documents are called Well Formed XML document. The syntax rules for XML are: 63

7 XML documents must have a root element XML elements must have a closing tag XML tags are case sensitive XML elements must be properly nested XML attribute values must be quoted 18. How do you validate a XML document? To validate an XML document a XML validator software is used. A XML validator is a software that is used to check the syntax of your XML document. 19. What is an XML Parser? An XML parser provides vital information to the program on how to read the file. It is built in within the web browser. An XML parser is the component that deciphers the XML code. Without a parser, your code cannot be understood. Computers require instruction. An XML parser provides vital information to the program on how to read the file. Parsers come in multiple formats and styles. They can be freestanding software, libraries, modules and classes. 20. How do you view XML documents in a web browser? It is possible for raw XML files to be viewed in all major browsers. But XML files are not displayed as HTML pages but with colour-coded root and child elements. A plus (+) or minus sign (-) to the left of the elements can be clicked to expand or collapse the element structure. To view the raw XML source (without the + and - signs), select View Page Source or View Source from the browser menu. You may double click on the XML document through My Computer ( or Computer as in Windows 7) to open it in the default browser. E. Application-based questions: 1. XML document structure can be divided in which two parts? What is meant by valid XML document (write three points)? Write the code to create an XML document to present the following data: Name Job Department Cubicle Srishti Programmer Engineer 5E Aditi Designer Marketing 19T The two parts of an XML document are XML Tree and DTD. A Valid XML document abides by the following rules: 1. XML documents must have a root element 2. XML elements must have a closing tag 3. XML tags are case sensitive <employees> <emp> <Name> Srishti</Name> <Job>Programmer</Job> <Department>Engineer</Department> 64

8 <Cubicle>5E</Cubicle> </emp> <emp> <Name> Aditi</Name> <Job> Designer </Job> <Department> Marketing </Department> <Cubicle>19T </Cubicle> </emp> </employee> 2. Draw the XML tree for the code given below: <employees> <employee sex= male > <name> <first> Harry </first> <last> Potter </last> </name> </employee> <employee sex= female > <name> <first>linda</first> <last> Ray </last> </name> </employee> </employees> Root <employees> <employees> Attribute: sex <name> <First> <Last> 65

9 3. Draw the XML tree for the code given below: <furniture> <Table material= wood > <Primary>100</Primary> <Middle>150</Middle> <Senior>150</Senior> </Table> <Table material= plastic > <Primary>200</Primary> <Middle>135</Middle> <Senior>150</Senior>0 </Table> </furniture> Root <furniture> <Table> Attribute: Material <Primary> <Middle> <Senior> 4. Create a DTD for storing book information for a library. The DTD should contain details about each book in terms of title, author (name, nickname), no. of copies, all of which can store character data. The no. of copies should contain two attributes named inhand and issued which are both mandatory. <? xml version= 1.0?> <!DOCTYPE LIBRARY[ <!ELEMENT LIBRARY (BOOK+)> <!ELEMENT BOOK (TITLE, AUTHOR+, NOC)> <!ELEMENT AUTHOR (NAME, NICKNAME)> <!ELEMENT TITLE (#PCDATA)> <!ELEMENT NAME (#PCDATA)> 66

10 <!ELEMENT NICNAME (#PCDATA)> <!ELEMENT NOC (#PCDATA)> <! ATTLIST NOC INHAND ISSUED CDATA #REQUIRED> ]> 5. Observe the DTD below and answer the following questions: <? xml version= 1.0?> <!DOCTYPE Company[ <!ELEMENT Company (Employee+)> <!ELEMENT Employee (FirstName, LastName, ContactNo, )> <!ELEMENT FirstName (#PCDATA)> <!ELEMENT LastName (#PCDATA)> <!ELEMENT ContactNo (#PCDATA)> <!ELEMENT (#PCDATA)> <! ATTLIST address CDATA #REQUIRED> ]> a. Name the root element of the above XML document. Company b. How many child elements are there in the above DTD? Name them. Child Employee, which again contains FirstName, LastName, ContactNo and . c. What does the + sign after the Employee element signify? It signifies that the Employee occur one or more times inside the element. d. Which of the element has an attribute associated with it? Name the element and also the attribute associated with it. and attribute: address e. What is the basic difference between the keywords PCDATA and CDATA? PCDATA stands for Parsed Character Data and XML parsers normally parse all the text in an XML document. CDATA - (Unparsed) Character Data is used about text data that should not be parsed by the XML parser. 67

What is XML? XML is designed to transport and store data.

What is XML? XML is designed to transport and store data. What is XML? XML stands for extensible Markup Language. XML is designed to transport and store data. HTML was designed to display data. XML is a markup language much like HTML XML was designed to carry

More information

XML: Introduction. !important Declaration... 9:11 #FIXED... 7:5 #IMPLIED... 7:5 #REQUIRED... Directive... 9:11

XML: Introduction. !important Declaration... 9:11 #FIXED... 7:5 #IMPLIED... 7:5 #REQUIRED... Directive... 9:11 !important Declaration... 9:11 #FIXED... 7:5 #IMPLIED... 7:5 #REQUIRED... 7:4 @import Directive... 9:11 A Absolute Units of Length... 9:14 Addressing the First Line... 9:6 Assigning Meaning to XML Tags...

More information

XML Introduction 1. XML Stands for EXtensible Mark-up Language (XML). 2. SGML Electronic Publishing challenges -1986 3. HTML Web Presentation challenges -1991 4. XML Data Representation challenges -1996

More information

Introduction Syntax and Usage XML Databases Java Tutorial XML. November 5, 2008 XML

Introduction Syntax and Usage XML Databases Java Tutorial XML. November 5, 2008 XML Introduction Syntax and Usage Databases Java Tutorial November 5, 2008 Introduction Syntax and Usage Databases Java Tutorial Outline 1 Introduction 2 Syntax and Usage Syntax Well Formed and Valid Displaying

More information

markup language carry data define your own tags self-descriptive W3C Recommendation

markup language carry data define your own tags self-descriptive W3C Recommendation XML intro What is XML? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display data XML tags are not predefined. You must define

More information

Tutorial 2: Validating Documents with DTDs

Tutorial 2: Validating Documents with DTDs 1. One way to create a valid document is to design a document type definition, or DTD, for the document. 2. As shown in the accompanying figure, the external subset would define some basic rules for all

More information

The concept of DTD. DTD(Document Type Definition) Why we need DTD

The concept of DTD. DTD(Document Type Definition) Why we need DTD Contents Topics The concept of DTD Why we need DTD The basic grammar of DTD The practice which apply DTD in XML document How to write DTD for valid XML document The concept of DTD DTD(Document Type Definition)

More information

Data Presentation and Markup Languages

Data Presentation and Markup Languages Data Presentation and Markup Languages MIE456 Tutorial Acknowledgements Some contents of this presentation are borrowed from a tutorial given at VLDB 2000, Cairo, Agypte (www.vldb.org) by D. Florescu &.

More information

Overview. Introduction. Introduction XML XML. Lecture 16 Introduction to XML. Boriana Koleva Room: C54

Overview. Introduction. Introduction XML XML. Lecture 16 Introduction to XML. Boriana Koleva Room: C54 Overview Lecture 16 Introduction to XML Boriana Koleva Room: C54 Email: bnk@cs.nott.ac.uk Introduction The Syntax of XML XML Document Structure Document Type Definitions Introduction Introduction SGML

More information

Introduction to XML. An Example XML Document. The following is a very simple XML document.

Introduction to XML. An Example XML Document. The following is a very simple XML document. Introduction to XML Extensible Markup Language (XML) was standardized in 1998 after 2 years of work. However, it developed out of SGML (Standard Generalized Markup Language), a product of the 1970s and

More information

Outline. XML vs. HTML and Well Formed vs. Valid. XML Overview. CSC309 Tutorial --XML 4. Edward Xia

Outline. XML vs. HTML and Well Formed vs. Valid. XML Overview. CSC309 Tutorial --XML 4. Edward Xia CSC309 Tutorial XML Edward Xia November 7, 2003 Outline XML Overview XML DOCTYPE Element Declarations Attribute List Declarations Entity Declarations CDATA Stylesheet PI XML Namespaces A Complete Example

More information

Chapter 1: Getting Started. You will learn:

Chapter 1: Getting Started. You will learn: Chapter 1: Getting Started SGML and SGML document components. What XML is. XML as compared to SGML and HTML. XML format. XML specifications. XML architecture. Data structure namespaces. Data delivery,

More information

Java EE 7: Back-end Server Application Development 4-2

Java EE 7: Back-end Server Application Development 4-2 Java EE 7: Back-end Server Application Development 4-2 XML describes data objects called XML documents that: Are composed of markup language for structuring the document data Support custom tags for data

More information

Structured documents

Structured documents Structured documents An overview of XML Structured documents Michael Houghton 15/11/2000 Unstructured documents Broadly speaking, text and multimedia document formats can be structured or unstructured.

More information

Introduction to XML. National University of Computer and Emerging Sciences, Lahore. Shafiq Ur Rahman. Center for Research in Urdu Language Processing

Introduction to XML. National University of Computer and Emerging Sciences, Lahore. Shafiq Ur Rahman. Center for Research in Urdu Language Processing Introduction to XML Shafiq Ur Rahman Center for Research in Urdu Language Processing National University of Computer and Emerging Sciences, Lahore XMLXML DTDDTD Related Related Standards Overview What

More information

Well-formed XML Documents

Well-formed XML Documents Well-formed XML Documents Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University 1 Agenda Types of XML documents Why Well-formed XML Documents

More information

XML. Objectives. Duration. Audience. Pre-Requisites

XML. Objectives. Duration. Audience. Pre-Requisites XML XML - extensible Markup Language is a family of standardized data formats. XML is used for data transmission and storage. Common applications of XML include business to business transactions, web services

More information

XML (Extensible Markup Language)

XML (Extensible Markup Language) Basics of XML: What is XML? XML (Extensible Markup Language) XML stands for Extensible Markup Language XML was designed to carry data, not to display data XML tags are not predefined. You must define your

More information

2009 Martin v. Löwis. Data-centric XML. XML Syntax

2009 Martin v. Löwis. Data-centric XML. XML Syntax Data-centric XML XML Syntax 2 What Is XML? Extensible Markup Language Derived from SGML (Standard Generalized Markup Language) Two goals: large-scale electronic publishing exchange of wide variety of data

More information

Solutions. a. Yes b. No c. Cannot be determined without the DTD. d. Schema. 9. Explain the term extensible. 10. What is an attribute?

Solutions. a. Yes b. No c. Cannot be determined without the DTD. d. Schema. 9. Explain the term extensible. 10. What is an attribute? Chapter 7: Information Representation Method XML Solutions Summative Assessment Multiple-Choice Questions (MCQs) 1. XML was developed to overcome the limitations of the markup language. a. EDI b. SGML

More information

The main Topics in this lecture are:

The main Topics in this lecture are: Lecture 15: Working with Extensible Markup Language (XML) The main Topics in this lecture are: - Brief introduction to XML - Some advantages of XML - XML Structure: elements, attributes, entities - What

More information

CSC Web Technologies, Spring Web Data Exchange Formats

CSC Web Technologies, Spring Web Data Exchange Formats CSC 342 - Web Technologies, Spring 2017 Web Data Exchange Formats Web Data Exchange Data exchange is the process of transforming structured data from one format to another to facilitate data sharing between

More information

CSS, Cascading Style Sheets

CSS, Cascading Style Sheets CSS, Cascading Style Sheets HTML was intended to define the content of a document This is a heading This is a paragraph This is a table element Not how they look (aka style)

More information

Introduction to XML Zdeněk Žabokrtský, Rudolf Rosa

Introduction to XML Zdeněk Žabokrtský, Rudolf Rosa NPFL092 Technology for Natural Language Processing Introduction to XML Zdeněk Žabokrtský, Rudolf Rosa November 28, 2018 Charles Univeristy in Prague Faculty of Mathematics and Physics Institute of Formal

More information

COMP9321 Web Application Engineering. Extensible Markup Language (XML)

COMP9321 Web Application Engineering. Extensible Markup Language (XML) COMP9321 Web Application Engineering Extensible Markup Language (XML) Dr. Basem Suleiman Service Oriented Computing Group, CSE, UNSW Australia Semester 1, 2016, Week 4 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2442

More information

Author: Irena Holubová Lecturer: Martin Svoboda

Author: Irena Holubová Lecturer: Martin Svoboda NPRG036 XML Technologies Lecture 1 Introduction, XML, DTD 19. 2. 2018 Author: Irena Holubová Lecturer: Martin Svoboda http://www.ksi.mff.cuni.cz/~svoboda/courses/172-nprg036/ Lecture Outline Introduction

More information

User Interaction: XML and JSON

User Interaction: XML and JSON User Interaction: XML and JSON Asst. Professor Donald J. Patterson INF 133 Fall 2011 1 What might a design notebook be like? Cooler What does a design notebook entry look like? HTML and XML 1989: Tim Berners-Lee

More information

Web Services Part I. XML Web Services. Instructor: Dr. Wei Ding Fall 2009

Web Services Part I. XML Web Services. Instructor: Dr. Wei Ding Fall 2009 Web Services Part I Instructor: Dr. Wei Ding Fall 2009 CS 437/637 Database-Backed Web Sites and Web Services 1 XML Web Services XML Web Services = Web Services A Web service is a different kind of Web

More information

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 7 XML

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 7 XML Chapter 7 XML 7.1 Introduction extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML Lax syntactical rules Many complex features that are rarely used HTML

More information

INTERNET PROGRAMMING XML

INTERNET PROGRAMMING XML INTERNET PROGRAMMING XML Software Engineering Branch / 4 th Class Computer Engineering Department University of Technology OUTLINES XML Basic XML Advanced 2 HTML & CSS & JAVASCRIPT & XML DOCUMENTS HTML

More information

Information Systems. XML Essentials. Nikolaj Popov

Information Systems. XML Essentials. Nikolaj Popov Information Systems XML Essentials Nikolaj Popov Research Institute for Symbolic Computation Johannes Kepler University of Linz, Austria popov@risc.uni-linz.ac.at Outline Introduction Basic Syntax Well-Formed

More information

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC. XML 2 APPLIATION hapter SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Objectives You will learn: How to create an XML document. The role of the document map, prolog, and XML declarations. Standalone declarations.

More information

FOUNDATION OF INFORMATION TECHNOLOGY

FOUNDATION OF INFORMATION TECHNOLOGY Series NVEQF Code No. 553 Roll No. Candidates must write the Code on the title page of the answer-book. Please check that this question paper contains 8 printed pages. Code number given on the right hand

More information

EXtensible Markup Language XML

EXtensible Markup Language XML EXtensible Markup Language XML 1 What is XML? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display data XML tags are not predefined.

More information

SDPL : XML Basics 2. SDPL : XML Basics 1. SDPL : XML Basics 4. SDPL : XML Basics 3. SDPL : XML Basics 5

SDPL : XML Basics 2. SDPL : XML Basics 1. SDPL : XML Basics 4. SDPL : XML Basics 3. SDPL : XML Basics 5 2 Basics of XML and XML documents 2.1 XML and XML documents Survivor's Guide to XML, or XML for Computer Scientists / Dummies 2.1 XML and XML documents 2.2 Basics of XML DTDs 2.3 XML Namespaces XML 1.0

More information

Extensible Markup Language (XML) Hamid Zarrabi-Zadeh Web Programming Fall 2013

Extensible Markup Language (XML) Hamid Zarrabi-Zadeh Web Programming Fall 2013 Extensible Markup Language (XML) Hamid Zarrabi-Zadeh Web Programming Fall 2013 2 Outline Introduction XML Structure Document Type Definition (DTD) XHMTL Formatting XML CSS Formatting XSLT Transformations

More information

7.1 Introduction. extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML

7.1 Introduction. extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML 7.1 Introduction extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML Lax syntactical rules Many complex features that are rarely used HTML is a markup language,

More information

Fundamentals of Web Programming a

Fundamentals of Web Programming a Fundamentals of Web Programming a Introduction to XML Teodor Rus rus@cs.uiowa.edu The University of Iowa, Department of Computer Science a Copyright 2009 Teodor Rus. These slides have been developed by

More information

User Interaction: XML and JSON

User Interaction: XML and JSON User Interaction: XML and JSON Assoc. Professor Donald J. Patterson INF 133 Fall 2012 1 XML w3schools.com bookstore book book book title author year price title author year price title author year price

More information

XML. Presented by : Guerreiro João Thanh Truong Cong

XML. Presented by : Guerreiro João Thanh Truong Cong XML Presented by : Guerreiro João Thanh Truong Cong XML : Definitions XML = Extensible Markup Language. Other Markup Language : HTML. XML HTML XML describes a Markup Language. XML is a Meta-Language. Users

More information

Introduction to XML. When talking about XML, here are some terms that would be helpful:

Introduction to XML. When talking about XML, here are some terms that would be helpful: Introduction to XML XML stands for the extensible Markup Language. It is a new markup language, developed by the W3C (World Wide Web Consortium), mainly to overcome limitations in HTML. HTML is an immensely

More information

Chapter 13 XML: Extensible Markup Language

Chapter 13 XML: Extensible Markup Language Chapter 13 XML: Extensible Markup Language - Internet applications provide Web interfaces to databases (data sources) - Three-tier architecture Client V Application Programs Webserver V Database Server

More information

.. Cal Poly CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar..

.. Cal Poly CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar.. .. Cal Poly CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar.. XML in a Nutshell XML, extended Markup Language is a collection of rules for universal markup of data. Brief History

More information

XML and DTD. Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 28

XML and DTD. Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 28 1 / 28 XML and DTD Mario Alviano University of Calabria, Italy A.Y. 2017/2018 Outline 2 / 28 1 Introduction 2 XML syntax 3 Namespace 4 Document Type Definition (DTD) 5 Exercises Outline 3 / 28 1 Introduction

More information

extensible Markup Language

extensible Markup Language extensible Markup Language XML is rapidly becoming a widespread method of creating, controlling and managing data on the Web. XML Orientation XML is a method for putting structured data in a text file.

More information

Constructing a Document Type Definition (DTD) for XML

Constructing a Document Type Definition (DTD) for XML Constructing a Document Type Definition (DTD) for XML Abstract John W. Shipman 2013-08-24 12:16 Describes the Document Type Definition notation for describing the schema of an SGML or XML document type.

More information

XML stands for Extensible Markup Language and is a text-based markup language derived from Standard Generalized Markup Language (SGML).

XML stands for Extensible Markup Language and is a text-based markup language derived from Standard Generalized Markup Language (SGML). About the Tutorial XML stands for Extensible Markup Language and is a text-based markup language derived from Standard Generalized Markup Language (SGML). This tutorial will teach you the basics of XML.

More information

XML. extensible Markup Language. Overview. Overview. Overview XML Components Document Type Definition (DTD) Attributes and Tags An XML schema

XML. extensible Markup Language. Overview. Overview. Overview XML Components Document Type Definition (DTD) Attributes and Tags An XML schema XML extensible Markup Language An introduction in XML and parsing XML Overview XML Components Document Type Definition (DTD) Attributes and Tags An XML schema 3011 Compiler Construction 2 Overview Overview

More information

Introduction to XML. XML: basic elements

Introduction to XML. XML: basic elements Introduction to XML XML: basic elements XML Trying to wrap your brain around XML is sort of like trying to put an octopus in a bottle. Every time you think you have it under control, a new tentacle shows

More information

Overview. Structured Data. The Structure of Data. Semi-Structured Data Introduction to XML Querying XML Documents. CMPUT 391: XML and Querying XML

Overview. Structured Data. The Structure of Data. Semi-Structured Data Introduction to XML Querying XML Documents. CMPUT 391: XML and Querying XML Database Management Systems Winter 2004 CMPUT 391: XML and Querying XML Lecture 12 Overview Semi-Structured Data Introduction to XML Querying XML Documents Dr. Osmar R. Zaïane University of Alberta Chapter

More information

XML. XML Syntax. An example of XML:

XML. XML Syntax. An example of XML: XML Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. Defined in the XML 1.0 Specification

More information

Semistructured data, XML, DTDs

Semistructured data, XML, DTDs Semistructured data, XML, DTDs Introduction to Databases Manos Papagelis Thanks to Ryan Johnson, John Mylopoulos, Arnold Rosenbloom and Renee Miller for material in these slides Structured vs. unstructured

More information

Outline. XML DOCTYPE External - SYSTEM. XML DOCTYPE Internal DTD &6&7XWRULDO ;0/ (GZDUG;LD

Outline. XML DOCTYPE External - SYSTEM. XML DOCTYPE Internal DTD &6&7XWRULDO ;0/ (GZDUG;LD &6&7XWRULDO ;0/ (GZDUG;LD Outline XML DOCTYPE Element Declarations Attribute List Declarations Entity Declarations CDATA Stylesheet PI A Complete Example -DQXDU\ 1 CSC309 Tutorial --XML 2 XML DOCTYPE Internal

More information

XML (Extensible Markup Language

XML (Extensible Markup Language XML (Extensible Markup Language XML is a markup language. XML stands for extensible Markup Language. The XML standard was created by W3C to provide an easy to use and standardized way to store self describing

More information

Introduction to Semistructured Data and XML. Overview. How the Web is Today. Based on slides by Dan Suciu University of Washington

Introduction to Semistructured Data and XML. Overview. How the Web is Today. Based on slides by Dan Suciu University of Washington Introduction to Semistructured Data and XML Based on slides by Dan Suciu University of Washington CS330 Lecture April 8, 2003 1 Overview From HTML to XML DTDs Querying XML: XPath Transforming XML: XSLT

More information

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0 WEB TECHNOLOGIES A COMPUTER SCIENCE PERSPECTIVE CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0 Modified by Ahmed Sallam Based on original slides by Jeffrey C. Jackson reserved. 0-13-185603-0 HTML HELLO WORLD! Document

More information

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2411 1 Extensible

More information

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering COMP9321 Web Application Engineering Semester 2, 2017 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid= 2465 1

More information

CSI 3140 WWW Structures, Techniques and Standards. Representing Web Data: XML

CSI 3140 WWW Structures, Techniques and Standards. Representing Web Data: XML CSI 3140 WWW Structures, Techniques and Standards Representing Web Data: XML XML Example XML document: An XML document is one that follows certain syntax rules (most of which we followed for XHTML) Guy-Vincent

More information

11. EXTENSIBLE MARKUP LANGUAGE (XML)

11. EXTENSIBLE MARKUP LANGUAGE (XML) 11. EXTENSIBLE MARKUP LANGUAGE (XML) Introduction Extensible Markup Language is a Meta language that describes the contents of the document. So these tags can be called as self-describing data tags. XML

More information

Databases and Internet Applications

Databases and Internet Applications Databases and Internet Applications Part 1 Chapter 7.1-7.5 Comp 521 Files and Databases Fall 2016 1 Uniform Resource Identifiers Uniform naming schema to identify resources on the Internet A resource can

More information

XML. Rodrigo García Carmona Universidad San Pablo-CEU Escuela Politécnica Superior

XML. Rodrigo García Carmona Universidad San Pablo-CEU Escuela Politécnica Superior XML Rodrigo García Carmona Universidad San Pablo-CEU Escuela Politécnica Superior XML INTRODUCTION 2 THE XML LANGUAGE XML: Extensible Markup Language Standard for the presentation and transmission of information.

More information

Chapter 2 XML, XML Schema, XSLT, and XPath

Chapter 2 XML, XML Schema, XSLT, and XPath Summary Chapter 2 XML, XML Schema, XSLT, and XPath Ryan McAlister XML stands for Extensible Markup Language, meaning it uses tags to denote data much like HTML. Unlike HTML though it was designed to carry

More information

Electronic Commerce Architecture Project LAB ONE: Introduction to XML

Electronic Commerce Architecture Project LAB ONE: Introduction to XML Electronic Commerce Architecture Project LAB ONE: Introduction to XML An XML document has two required parts. The first is the definition of what data should be in the document. The second is the document

More information

XML Information Set. Working Draft of May 17, 1999

XML Information Set. Working Draft of May 17, 1999 XML Information Set Working Draft of May 17, 1999 This version: http://www.w3.org/tr/1999/wd-xml-infoset-19990517 Latest version: http://www.w3.org/tr/xml-infoset Editors: John Cowan David Megginson Copyright

More information

Appendix H XML Quick Reference

Appendix H XML Quick Reference HTML Appendix H XML Quick Reference What Is XML? Extensible Markup Language (XML) is a subset of the Standard Generalized Markup Language (SGML). XML allows developers to create their own document elements

More information

Part II: Semistructured Data

Part II: Semistructured Data Inf1-DA 2011 2012 II: 22 / 119 Part II Semistructured Data XML: II.1 Semistructured data, XPath and XML II.2 Structuring XML II.3 Navigating XML using XPath Corpora: II.4 Introduction to corpora II.5 Querying

More information

2006 Martin v. Löwis. Data-centric XML. Document Types

2006 Martin v. Löwis. Data-centric XML. Document Types Data-centric XML Document Types Purpose 2006 Martin v. Löwis Document Type Definitions define a vocabulary set of allowed element names set of attributes per element name data type given for each attribute

More information

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية HTML Mohammed Alhessi M.Sc. Geomatics Engineering Wednesday, February 18, 2015 Eng. Mohammed Alhessi 1 W3Schools Main Reference: http://www.w3schools.com/ 2 What is HTML? HTML is a markup language for

More information

Birkbeck (University of London)

Birkbeck (University of London) Birkbeck (University of London) MSc Examination Department of Computer Science and Information Systems Internet and Web Technologies (COIY063H7) 15 Credits Date of Examination: 13 June 2017 Duration of

More information

XML, XPath, and XSLT. Jim Fawcett Software Modeling Copyright

XML, XPath, and XSLT. Jim Fawcett Software Modeling Copyright XML, XPath, and XSLT Jim Fawcett Software Modeling Copyright 1999-2017 Topics XML is an acronym for extensible Markup Language. Its purpose is to describe structured data. XPath is a language for navigating

More information

Introduction to Database Systems CSE 414

Introduction to Database Systems CSE 414 Introduction to Database Systems CSE 414 Lecture 14-15: XML CSE 414 - Spring 2013 1 Announcements Homework 4 solution will be posted tomorrow Midterm: Monday in class Open books, no notes beyond one hand-written

More information

XML Structures. Web Programming. Uta Priss ZELL, Ostfalia University. XML Introduction Syntax: well-formed Semantics: validity Issues

XML Structures. Web Programming. Uta Priss ZELL, Ostfalia University. XML Introduction Syntax: well-formed Semantics: validity Issues XML Structures Web Programming Uta Priss ZELL, Ostfalia University 2013 Web Programming XML1 Slide 1/32 Outline XML Introduction Syntax: well-formed Semantics: validity Issues Web Programming XML1 Slide

More information

XML and XSLT. XML and XSLT 10 February

XML and XSLT. XML and XSLT 10 February XML and XSLT XML (Extensible Markup Language) has the following features. Not used to generate layout but to describe data. Uses tags to describe different items just as HTML, No predefined tags, just

More information

XML: Managing with the Java Platform

XML: Managing with the Java Platform In order to learn which questions have been answered correctly: 1. Print these pages. 2. Answer the questions. 3. Send this assessment with the answers via: a. FAX to (212) 967-3498. Or b. Mail the answers

More information

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC. XML 2 APPLIATION hapter SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Objectives You will learn: How to create an XML document. The role of the document map, prolog, and XML declarations. Standalone declarations.

More information

TASC Consulting Technical Writing Courseware Training

TASC Consulting Technical Writing Courseware Training Understanding XML Aruna Panangipally TASC Consulting Technical Writing Courseware Training Session Outline Why should a technical writer know XML? The Beginning Understanding markup languages Origins of

More information

Delivery Options: Attend face-to-face in the classroom or remote-live attendance.

Delivery Options: Attend face-to-face in the classroom or remote-live attendance. XML Programming Duration: 5 Days Price: $2795 *California residents and government employees call for pricing. Discounts: We offer multiple discount options. Click here for more info. Delivery Options:

More information

XML: Parsing and Writing

XML: Parsing and Writing XML: Parsing and Writing Version 7.2.0.2 Paul Graunke and Jay McCarthy January 17, 2019 (require xml) package: base The xml library provides functions for parsing and generating XML. XML can be represented

More information

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 27-1

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 27-1 Slide 27-1 Chapter 27 XML: Extensible Markup Language Chapter Outline Introduction Structured, Semi structured, and Unstructured Data. XML Hierarchical (Tree) Data Model. XML Documents, DTD, and XML Schema.

More information

Fundamentals of Web Programming a

Fundamentals of Web Programming a Fundamentals of Web Programming a Introduction to XML Teodor Rus rus@cs.uiowa.edu The University of Iowa, Department of Computer Science a Copyright 2009 Teodor Rus. These slides have been developed by

More information

W3C XML XML Overview

W3C XML XML Overview Overview Jaroslav Porubän 2008 References Tutorials, http://www.w3schools.com Specifications, World Wide Web Consortium, http://www.w3.org David Hunter, et al.: Beginning, 4th Edition, Wrox, 2007, 1080

More information

Comp 336/436 - Markup Languages. Fall Semester Week 4. Dr Nick Hayward

Comp 336/436 - Markup Languages. Fall Semester Week 4. Dr Nick Hayward Comp 336/436 - Markup Languages Fall Semester 2017 - Week 4 Dr Nick Hayward XML - recap first version of XML became a W3C Recommendation in 1998 a useful format for data storage and exchange config files,

More information

Part 2: XML and Data Management Chapter 6: Overview of XML

Part 2: XML and Data Management Chapter 6: Overview of XML Part 2: XML and Data Management Chapter 6: Overview of XML Prof. Dr. Stefan Böttcher 6. Overview of the XML standards: XML, DTD, XML Schema 7. Navigation in XML documents: XML axes, DOM, SAX, XPath, Tree

More information

StreamServe Persuasion SP5 XMLOUT

StreamServe Persuasion SP5 XMLOUT StreamServe Persuasion SP5 XMLOUT User Guide Rev A StreamServe Persuasion SP5 XMLOUT User Guide Rev A 2001-2010 STREAMSERVE, INC. ALL RIGHTS RESERVED United States patent #7,127,520 No part of this document

More information

CLASS DISCUSSION AND NOTES

CLASS DISCUSSION AND NOTES CLASS DISCUSSION AND NOTES April 2011 Mon Tue Wed Thu Fri 4 5 6 7 8 AH-8 (individual) Chap. 12 XML 11 12 13 14 15 AH-9 (team) Quiz #2 I. GETTING STARTED COURSE OVERVIEW II. DATABASE DESIGN & IMPLEMENTATION

More information

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0 CSI 3140 WWW Structures, Techniques and Standards Markup Languages: XHTML 1.0 HTML Hello World! Document Type Declaration Document Instance Guy-Vincent Jourdan :: CSI 3140 :: based on Jeffrey C. Jackson

More information

Introduction to XML the Language of Web Services

Introduction to XML the Language of Web Services Introduction to XML the Language of Web Services Tony Obermeit Senior Development Manager, Wed ADI Group Oracle Corporation Introduction to XML In this presentation, we will be discussing: 1) The origins

More information

SAMPLE PAPER I CLASS- X SUBJECT FOUNDATION OF IT. TIME : 3 HRS M.M - 90 NOTE: 1. All questions are compulsory. 2. Write neat and clean.

SAMPLE PAPER I CLASS- X SUBJECT FOUNDATION OF IT. TIME : 3 HRS M.M - 90 NOTE: 1. All questions are compulsory. 2. Write neat and clean. SAMPLE PAPER I CLASS- X SUBJECT FOUNDATION OF IT TIME : 3 HRS M.M - 90 NOTE: 1. All questions are compulsory. 2. Write neat and clean. I. Fill in the Blanks: (10x1=10) 1. is a computer threat that multiplies

More information

M359 Block5 - Lecture12 Eng/ Waleed Omar

M359 Block5 - Lecture12 Eng/ Waleed Omar Documents and markup languages The term XML stands for extensible Markup Language. Used to label the different parts of documents. Labeling helps in: Displaying the documents in a formatted way Querying

More information

PART. Oracle and the XML Standards

PART. Oracle and the XML Standards PART I Oracle and the XML Standards CHAPTER 1 Introducing XML 4 Oracle Database 10g XML & SQL E xtensible Markup Language (XML) is a meta-markup language, meaning that the language, as specified by the

More information

CountryData Technologies for Data Exchange. Introduction to XML

CountryData Technologies for Data Exchange. Introduction to XML CountryData Technologies for Data Exchange Introduction to XML What is XML? EXtensible Markup Language Format is similar to HTML, but XML deals with data structures, while HTML is about presentation Open

More information

Introduction to XML (Extensible Markup Language)

Introduction to XML (Extensible Markup Language) Introduction to XML (Extensible Markup Language) 1 History and References XML is a meta-language, a simplified form of SGML (Standard Generalized Markup Language) XML was initiated in large parts by Jon

More information

Introduction to XML. M2 MIA, Grenoble Université. François Faure

Introduction to XML. M2 MIA, Grenoble Université. François Faure M2 MIA, Grenoble Université Example tove jani reminder dont forget me this weekend!

More information

The components of a basic XML system.

The components of a basic XML system. XML XML stands for EXtensible Markup Language. XML is a markup language much like HTML XML is a software- and hardware-independent tool for carrying information. XML is easy to learn. XML was designed

More information

Editor s Concrete Syntax (ECS): a Profile of SGML for Editors

Editor s Concrete Syntax (ECS): a Profile of SGML for Editors Editor s Concrete Syntax (ECS): a Profile of SGML for Editors Topologi Technical Note. August 13, 2002 Rick Jelliffe SGML and XML Editing Concrete Syntax (ECS) This draft paper formalizes the lexical

More information

[MS-XML]: Microsoft Extensible Markup Language (XML) 1.0 Fourth Edition Standards Support Document

[MS-XML]: Microsoft Extensible Markup Language (XML) 1.0 Fourth Edition Standards Support Document [MS-XML]: Microsoft Extensible Markup Language (XML) 1.0 Fourth Edition Standards Support Document Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft

More information

Marker s feedback version

Marker s feedback version Two hours Special instructions: This paper will be taken on-line and this is the paper format which will be available as a back-up UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Semi-structured Data

More information

Semistructured Data and XML

Semistructured Data and XML Semistructured Data and XML Computer Science E-66 Harvard University David G. Sullivan, Ph.D. Structured Data The logical models we've covered thus far all use some type of schema to define the structure

More information

XML. Part I XML Document and DTD

XML. Part I XML Document and DTD XML Part I XML Document and DTD What is XML? XML = Extensible Markup Language A Mark up language Designed based on SGML with less complexity Goal: data interchange over the web What is XML? เป ด น อย HTML

More information