Difference Between Simple and Extended Link in XML
In this article I will explain the Difference between simple and extended Link
XLink have a two type:
Extended link - An extended link describes a collection of resources and a collection of path between those resources. each path connected with exactly two resources.
The Example of Extended Link is as follows:
<extendedlink
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="extended">
<local_resource_element
xlink:type="resource">
Any content here
</local_resource_element>
<remote_resource_element
xlink:type="locator">
Any content here
</remote_resource_element>
</extendedlink>
|
Simple Link -A simple Link is a link that associates with exactly two resources, one local and one remote. simple link defines an outbound link from a local resource to a remote resource.
The Example of Simple Link is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="song.css"?>
<!DOCTYPE SONG SYSTEM "song.dtd">
<SONG xmlns="http://metalab.unc.edu/xml/namespace/song"
xmlns:xlink="http://www.w3.org/1999/xlink">
<TITLE>Album</TITLE>
<PHOTO
xlink:type="simple" xlink:show="onLoad" xlink:href="hotcop.jpg"
ALT="Victor Willis in Cop Outfit" WIDTH="100" HEIGHT="200"/>
<COMPOSER>A R Rahman</COMPOSER>
<PRODUCER>Anu Malik</PRODUCER>
<PUBLISHER xlink:type="simple" xlink:href="http://www.amrecords.com/">
A & M Records
</PUBLISHER>
<LENGTH>5:20</LENGTH>
<YEAR>2011</YEAR>
<ARTIST>india</ARTIST>
</SONG>
|
|
Output:
Album
A R Rahman
Anu Malik
A & M Records
5:20
2011
india |
Further Readings
You may also want to read these related articles :
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here