



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is an introductory course on Information and Coomputer Technologies. Topics include ICT terminologies, hardware and software components, the internet and world wide web, and ICT based applications. It includes: Xml, Document, Structuring, Dtd, Extensible, Markup, Language, Technology, Schema, Definition, Extensible
Typology: Exercises
1 / 6
This page cannot be seen from the preview
Don't miss anything!




EC 420- E-Commerce
Using XML for Document Structuring
EC 420- E-Commerce
Background
XML (Extensible Markup Language) is a dialect of SGML. XML is not a programming language. Rather it is a set of rules that allow you to represent data in a structured manner. Since the rules are standard, the XML documents can be automatically generated and processed.
Its use can be gauged from its name itself –
Markup – Is a collection of Tags XML Tags – Identify the content of data Extensible – User-defined tags
XML is a markup language much like HTML, but used for purposes different than what HTML is used for. It’s not a replacement for HTML.
XML Technology
XSD - XML Schema Definition DTD - Document Type Definition. XSL - Extensible Style sheet Language
EC 420- E-Commerce
In this example, we discuss markup used by a day planner application for scheduling appointments.
Note: You may use any text editor or Visual Studio for creating the xml file provided in this example. Please do not write line numbers. These are just for explanation purpose only.
When scheduling appointments and tasks, the date, time and appointment type are required. An XML document that marks up appointments is shown below.
Line 6 is the root element planner, which holds all of the appointments. Within element planner, we have a year element, which has attribute value for storing the year being planned. If we make appointments for the year 2001, a new year element with value of 2001 is created before the planner end tag.
Line 10 shows element date, which is used to store a specific date. Element date has two attributes, month and day, which store the month and day of the appointment, respectively.
Line 11
marks up an appointment for July 15, 2000, at 1430 military time (i.e., 2:30 pm). A date element may contain many note elements, each for a specific time. A note element does not have to contain a time attribute, such as on line 16
which denotes an event for an entire day—July 4, Independence Day.
EC 420- E-Commerce
Problem 1: Rewrite the XML document above such that each note element has year , month , day and time attributes rather than child elements. The solution should contain only the root element and note child elements.
Problem 2: Online Banking – Statement Request and Transactions based on XML a. Create an XML document that marks up the statement request for a bank customer. You document should contain elements describing bank id, account id, account type and other required elements e.g. some root element. b. Create an XML document that marks up a bank to bank transaction. Think about the required tags for this type of document.