Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2
Copyright 2007, Oracle. All rights reserved.
Module Objectives
After completing this module you will be able to:
Describe the role of XML in application integration Identify tags, elements, and attributes in an XML document Examine how structure of an XML documents can be specified Explain the purposes of namespaces
2 of 20
Integration Challenge
Binary Character-based
Data values only Data values plus tags that describe the data items
3 of 20
Is well suited for describing hierarchically related data Provides a universal syntax for exchanging data among applications
Platform-independent Operating systemindependent Database-independent Vendor-neutral language Coordinated by the World Wide Web Consortium (W3C)
Widely supported
4 of 20
XML Documents
Name in tag is known as an element type Is a name-value pair immediately following a start tag
The value is a string in quotation marks
Element
5 of 20
XML Elements
Types of elements
Root: the element that contains all other elements Parent: an element that contains other elements Child: element contained within another element
Root start tag
Is child element of contact Is parent of home and cell Root end tag
6 of 20
XML documents contain tags that specify the nature and relationship of content items
Tags are extensible (additional tags can be defined by users)
HTML documents contain tags that specify how the content is rendered in a browser
Tags are predefined and not extensible
HTML Example
<bold> John Smith </bold>, <br> <italic> member since 1998 </italic>,
8 of 20
Defines the element names, parent/child relationships, and attributes in a class of XML documents
Is not an XML document itself
9 of 20
Defines the element names, parent/child relationships, and attributes in a class of XML documents
Is written in XML itself
Does not require intermediate processing Can be used with other XML-based tools
For instance some XML tools allow creating correct XML documents from an XSD
10 of 20
11 of 20
Specifies how to transform an XML document into an XML document with a different structure
Is based on XSL
Source XML document
12 of 20
Is used in integration applications to map (transform) data from source to target applications
13 of 20
Names of element types and attributes can be duplicated within a single XML document or across multiple XML documents
Need to distinguish duplicate names with different meanings
14 of 20
XML Namespace
Is a collection of element types and attribute names that are unique Has a name itself that is unique among all XML namespaces
Recommended practice is to base namespace name on your organizations url
Specify a namespace for a document or element using an xmlns attribute Results in unique names by combining:
The name of the namespace The local element type or attribute name
Allows combining fragments from multiple documents that might contain duplicate names
Namespace for the book element
16 of 20
Summary of XML
XML namespace: defines the uniqueness of a set of element and attribute names
Appear in most XSD documents Part of the configuration of Siebel Web services
17 of 20
Summary
This module showed you how to:
Describe the role of XML in application integration Identify tags, elements, and attributes in an XML document Examine how structure of an XML documents can be specified Explain the purposes of namespaces
18 of 20
Lab
19 of 20