Sei sulla pagina 1di 19

Integration Siebel Applications

Module 2: XML Concepts

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

Why you need to know:


XML documents are used for the exchange of data for many integration solutions

Copyright 2007, Oracle. All rights reserved.

2 of 20

Integration Challenge

Application integration involves exchanging data among multiple applications


Choices for type:

Binary Character-based

Choices for content:

Data values only Data values plus tags that describe the data items

Siebel applications typically exchange data in the form of XML documents

Copyright 2007, Oracle. All rights reserved.

3 of 20

XML = Extensible Markup Language

Is a text-based language syntax with user-definable tags


Describe the nature and structure of information Do not describe the presentation of the data

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

Copyright 2007, Oracle. All rights reserved.

4 of 20

XML Documents

Contains one or more elements


Are delimited by start and end tags that enclose content

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

Might include one or more attribute specifications

Might include additional elements


Attribute

Start tag End tag


Copyright 2007, Oracle. All rights reserved.

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

Copyright 2007, Oracle. All rights reserved.

6 of 20

Comparison of XML and HTML

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>,

John Smith member since 1998


Copyright 2007, Oracle. All rights reserved. 7 of 20

Definition of XML Documents

Applications receiving XML documents:


Need to understand the structure of the document Might want to verify that the document is correctly constructed

XML documents can be defined by:


Document Type Definition (DTD) XML Schema Definition (XSD) And so forth

Copyright 2007, Oracle. All rights reserved.

8 of 20

Document Type Definition (DTD)

Defines the element names, parent/child relationships, and attributes in a class of XML documents
Is not an XML document itself

Copyright 2007, Oracle. All rights reserved.

9 of 20

XML Schema Definition (XSD)

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

Copyright 2007, Oracle. All rights reserved.

10 of 20

Extensible Stylesheet Language (XSL)

Is a language used to specify how an XML document should be displayed to a user


Based on rules that specify how to display elements of a given element type
XML document

Result of an XSL transformations

Copyright 2007, Oracle. All rights reserved.

11 of 20

XSL Transformation (XSLT)

Specifies how to transform an XML document into an XML document with a different structure
Is based on XSL
Source XML document

Target XML document

Copyright 2007, Oracle. All rights reserved.

12 of 20

XSL Transformation (XSLT) Continued

Is used in integration applications to map (transform) data from source to target applications

Copyright 2007, Oracle. All rights reserved.

13 of 20

Names in XML Documents

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

Both documents have element type of title

Copyright 2007, Oracle. All rights reserved.

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

One namespace: http://www.abc.com/contacts

Another namespace: http://www.abc.com/books


15 of 20

Copyright 2007, Oracle. All rights reserved.

Using XML Namespaces

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

Copyright 2007, Oracle. All rights reserved.

16 of 20

Summary of XML

XML: format for data exchanged among applications


Used extensively in EAI and UAN

XSD/DTD: specifies the structure of the data exchanged


Used extensively in UAN; somewhat in EAI

XSLT: specifies how to transform one data structure into another


Used extensively in UAN

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

Copyright 2007, Oracle. All rights reserved.

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

Copyright 2007, Oracle. All rights reserved.

18 of 20

Lab

In the lab you will:


Examine an XML document and the DTD/XSD that describes it Transform an XML document using XSLT

Copyright 2007, Oracle. All rights reserved.

19 of 20

Potrebbero piacerti anche