Explore model answers categorized by subjects like Java, HTML, DBMS, and more.
If you want to link an XML page than you useWe define XLink outside XLink files.
- XLink and XPointer which are parts of XML Linking.
- XLink is compact name of XML Linking Language.Using
- XLink we can made hyperlink in an XML document.
- XPointer is an compact name of XML Pointer Language.
- XPointer give facility hyperlink to point one or parts in an XML document.
- XLink has W3C Recommendation since 27 June 2001.
- XPointer has W3C Recommendation since 25 March 2003.
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>.
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\":