0% found this document useful (0 votes)
98 views

An Example XML Document: XML (Extensible Markup Language)

XML is a software and hardware independent tool for carrying information. It was designed to transport and store data with a focus on what data is, unlike HTML which focuses on how data looks. XML documents use a self-describing syntax with elements that can have child and sibling elements in a tree structure. Web services use technologies like XML, SOAP, WSDL and HTTP to allow applications to communicate and exchange data over the internet regardless of operating system or programming language differences.

Uploaded by

Daniel Aguirre
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views

An Example XML Document: XML (Extensible Markup Language)

XML is a software and hardware independent tool for carrying information. It was designed to transport and store data with a focus on what data is, unlike HTML which focuses on how data looks. XML documents use a self-describing syntax with elements that can have child and sibling elements in a tree structure. Web services use technologies like XML, SOAP, WSDL and HTTP to allow applications to communicate and exchange data over the internet regardless of operating system or programming language differences.

Uploaded by

Daniel Aguirre
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

XML

(EXtensible Markup Language)

XML is a software and hardware independent tool for carrying information.

XML was designed to transport and store data, with focus on what data is.
HTML was designed to display data, with focus on how data looks.

The tags are "invented" by the author of the XML document.

If you need to display dynamic data in your HTML document, it will take a lot of work to
edit the HTML each time the data changes.

With XML, data can be stored in separate XML files. This way you can concentrate on
using HTML for layout and display, and be sure that changes in the underlying data will
not require any changes to the HTML.

With a few lines of JavaScript, you can read an external XML file and update the data
content of your HTML.

An Example XML Document


XML documents use a self-describing and simple syntax:

<?xml version="1.0" encoding="ISO-8859-1"?>


<note> // root element
<to>Tove</to> // child elements
<from>Jani</from> // child elements
<heading>Reminder</heading> //child elements
<body>Don't forget me this weekend!</body> // child elements
</note>

XML Documents Form a Tree Structure


XML documents must contain a root element. This element is "the parent" of all other
elements.
The elements in an XML document form a document tree. The tree starts at the root and
branches to the lowest level of the tree.

All elements can have sub elements (child elements):

<root>
<child>
<subchild>.....</subchild>
</child>
</root>

The terms parent, child, and sibling are used to describe the relationships between
elements. Parent elements have children. Children on the same level are called siblings
(brothers or sisters).

Example:

The image above represents one book in the XML below:

<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="CHILDREN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="WEB">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>

XML Tags are Case Sensitive


XML Attribute Values Must be Quoted
Ex: <note date="12/11/2007">

There are 5 predefined entity references in XML:

&lt; < less than


&gt; > greater than
&amp; & ampersand 
&apos; ' apostrophe
&quot; " quotation mark

XML Naming Rules


XML elements must follow these naming rules:

 Names can contain letters, numbers, and other characters


 Names must not start with a number or punctuation character
 Names must not start with the letters xml (or XML, or Xml, etc)
 Names cannot contain spaces

One of the beauties of XML, is that it can often be extended( add more element) without
breaking applications.
Avoid XML Attributes?
Some of the problems with using attributes are:

 attributes cannot contain multiple values (elements can)


 attributes cannot contain tree structures (elements can)
 attributes are not easily expandable (for future changes)
Web Service

Web service merupakan salah satu bentuk implementasi dari arsitektur model
aplikasi N-tier. Arsitektur web service melibatkan banyak teknologi yang saling
berhubungan antar layer. (W3C,2004).

Fungsi-fungsi yang mendukung business logic dari suatu sistem dibuat dalam web
service. Service yang dibuat, dapat digunakan dalam platform, bahasa pemrograman
dan device yang beranekaragam.

Teknologi web service menawarkan kemudahan menjembatani antar informasi tanpa


mempermasalahan perbedaan teknologi yang digunakan oleh tiap sumber
(Siswoutomo, 2004).

Web service didesain untuk mendayagunakan jaringan internet dengan


menggunakan teknologi XML dengan protokol HTTP. Dengan menggunakan format
dokumen XML yang berbasis teks, web service memungkinkan suatu aplikasi
berkomunikasi dengan aplikasi lainnya.

SOAP

SOAP suatu format untuk mengirim pesan berbasis XML yang menyediakan jalan
untuk berkomunikasi antar aplikasi dengan perbedaan sistem operasi, teknologi
maupun bahasa pemrograman.

SOAP melakukan pengiriman pesan berbasis XML. Proses permodelan yang dapat
dikembangkan. SOAP messages dapat dibawa oleh berbagai protokol jaringan seperti
HTTP, SMTP, FTP, RMI/IIOP, atau messaging protokol yang lain (W3C,2004).

WSDL

WSDL merupakan suatu dokumen XML yang menjelaskan method-method yang


tersedia dalam web service, parameter apa yang diperlukan untuk memanggil suatu
method, dan tipe hasil dari method yang akan dipanggil.

WSDL menguraikan web service, mulai dari pertukaran pesan agen requester (client)
dan agen penyedia (server provider). Pesan dari server diuraikan dengan mengikat
informasi protokol jaringan yang digunakan oleh method dan format pesan.
(W3C,2004).

WSDL adalah dokumen XML yang machine-readable bukan human-readable. Oleh


karena itu dokumen tersebut dapat dimanfaatkan untuk otomatisasi proses
integerasi layanan ke aplikasi requestor.

NuSOAP
Nusoap adalah toolkit berbasis PHP yang bekerja dengan service SOAP. Kelebihan
NuSOAP adalah kesederhanaan dari instalasi yang berupa include library NuSOAP ke
dalam script dalam pengembangan aplikasi web service. NuSoap juga memiliki
penanganan kesalahan yang baik dan dokumentasi yang lengkap. NuSoap
dikembangkan oleh scientist yang bernama Dietrich Alaya (Campbell,2002).

HTTP

HTTP merupakan salah satu protokol yang banyak digunakan dalam jaringan
internet.Secara umum web services berinteraksi menggunakan TCP/IP dan HTTP
sebagai sarana transpotasi.

Mekanisme Transaksi web service antara pihak requestor (peminta jasa layanan web
service) dan pihak provider (penyedia jasa)

You might also like