XLXP Programming Questions & Answers

Explore model answers categorized by subjects like Java, HTML, DBMS, and more.

XLXP Programming Questions & Answers

What is XLink and XPointer?

Answer:
 If you want to link an XML page than you use 

  1. XLink and XPointer which are parts of XML Linking.
  2.  XLink is compact name of XML Linking Language.Using
  3. XLink we can made hyperlink in an XML document.

We define XLink outside XLink files.
  1.  XPointer is an compact name of XML Pointer Language.
  2. XPointer give facility hyperlink to point one or parts in an XML document.
  3.  XLink has W3C Recommendation since 27 June 2001.
  4.  XPointer has W3C Recommendation since 25 March 2003.

How you define syntax of XLink?

Answer:
 We know that in HTML we bade an hyperlink by using <a> elements.But this will not work in XML.We can create an hyperlink by using XLink.

I explain you how to create an hyperlink in XML by XLink with an example:


<?xml version=\"1.0\"?>
<homepages xmlns:xlink=\"http://www.w3.org/1999/xlink\">
  <homepage xlink:type=\"simple\"
  xlink:href=\"http://www.r4r.co.in\">Huge
  collection of interview question</homepage>
  <homepage xlink:type=\"simple\"
  xlink:href=\"http://www.r4r.in\">Enjoy with
  R4R</homepage>
</homepages>


  \"http://www.w3.org/1999/xlink\" it is an XLink namespace.
 XLink use two attributes type and href as xlink:type and the xlink:href attributes in the <homepage>.

How you define syntax of XPointer?

Answer:
 We use XPointer to made hyperlink that point one or more parts in an XML document.means using XPointer we can made a hyperlink that point points to web page or bookmarks that are inside the web page by using #.

I explain you with an example:

href=\"http://www.allexamples.com/cdlist.xml#id(\'kate\').child(4,item)\">

 In the above example we use XPointer to point  the fourth item in a list with a unique id \"kate\":