Extensible Markup Language: in This Session, You Will Learn To
Extensible Markup Language: in This Session, You Will Learn To
Objectives
Complex Element
A complex element contains other elements, attributes, and
mixed content.
To declare a complex element, you need to first define a
complex data type.
After defining the complex data type, you can declare a
complex element by associating this data type with the
element.
Problem Statement:
CyberShoppe, a toy and book store in the United States, sends
its product information from the head office to the branch
offices. The product details must be stored in a consistent
format. Restrictions must be placed on the type of data that
can be saved in the data store, in order to ensure uniformity
and consistency of information.
The product details include the product name, a brief
description, product price, and the available quantity on hand.
The price of the product must always be greater than zero.
Problem Statement:
The Marketing Manager at CyberShoppe sends its product
information from its head office to the branch offices. The
branch offices update this file and send it back to the head
office on a routine basis. The product details must be stored in
a consistent format at all branches. Restrictions must be
placed on the type of data that can be saved in the data store,
to ensure uniformity and consistency of information.
CyberShoppe sells two categories of products, books and toys.
Product details include the product name, a brief description,
product price, and the available quantity on hand. The product
price must always be greater than zero. In addition to these
details, the data store needs to store the category and product
ID.
Problem Statement:
The various products at CyberShoppe are purchased from their
suppliers through their branch offices. The purchase order
details are sent to the head office to generate reports. To
ensure that the data can be accessed across all hardware and
software used at the head office, the branch offices send data
in an XML format. On receiving this data, the head office needs
to verify that all branches have specified the required
information in a consistent format.
The purchase order details sent by the branch offices include
the product ID, order ID, date of the purchase order, name and
address of the supplier, quantity ordered, and price per unit.