Thursday, November 15, 2012

XML links or Xlink

In XML, tags are made up which makes XML links almost impossible. The solution to this is Xlink, which is a standard for XML links. To display links use a code like this;
<?xml version="1.0"?>

 <homepages xmlns:xlink="http://www.google.com">

<homepage xlink:type="simple"
 xlink:href="http://ddg.gg">Duck Duck Go</homepage>

<homepage xlink:type="simple"
 xlink:href="http://www.google.com">Google</homepage>

</homepages>


An easy example would be this;
<plantstore xmlns:xlink="http://www.w3.org/1999/xlink">
 <plant name="Petunia">
<description
xlink:type="simple"
  xlink:href="http://plants.com/images/petunia.png"
xlink:show="new">
  The familiar petunia at a bargain price.
</description>
</book>

</bookstore>


You can repeat the highlighted text as often as you like. 

No comments:

Post a Comment

Feel free to comment. Keep it nice, polite and on topic. You may link to a site if it contains content relates to the content of whatever post you are commenting on. You may link to a site that only uses, for example, HTML5 video. Remember, on topic!