Recent Articles

Integrative Thinking For The OSS Community
I just finished the third of four week-long residence weeks for school. One more to go and I'll get some semblance of a life back...my wife can't wait. "The Opposable Mind" by Roger Martin was one of the...

Open Source Business Model Problems
I would like to join the the ongoing discussion about open source software business models driven by Matthew Aslett who in turn was answering Savio Rodrigues's post on how to fix the 'broken' open source business...

Google Set To Launch App Engine API
Google has introduced its Google App Engine API along with new services for developers. The Google App Engine allows developers to create their web applications based on the engine and operate them through Google, which host the applications and offers storage.

The Harsh Reality of ASP.NET Developers
You're participating in the stagnation of the World Wide Web and you hold the human race hostage. Ouch, that was a bit harsh, but it probably got your attention. That's important because what I want to address is no...

Don't Be Lazy When Coding
Lately I've been seeing a lot of sites where the designers were a bit lazy on the coding of the visual elements. Especially when it comes to creating new styles for the style sheet. In CSS, it's pretty easy to develop...


WebProWire.com
TechnologySearchAdvertisingSocialFinancialLegal
Latest News on: WebProWire.com

First Firefox 3 patch fixes a... BetaNews
The Twitter API: Giving away the... mathewingram.com/wor
LinkedIn Fires Up DirectAds SmallBusinessNewz
Hitwise: Twitter Taking Off In The WebProNews
Sad Flacks Secretly Edit Their... Gawker

07.16.08

How To Find Semantic Links On A Website

By Mads Kristensen

Imaging a visitor that enters his website URL into a textbox and when he clicks the submit button, you are able to retrieve all kinds of information from the guy.

His name, company info, online profiles, interests etc. all this from just a URL. It's actually pretty easy if the website contains information about FOAF, APML or SIOC documents.

What you have to do is to download the HTML from the website and look for <link> elements in the header that matches FOAF, APML or SIOC type links. Then retrieve the URL to those documents from the href attribute and load it into an XML document. Now you can use XPath to find all the information you need.

Here's is what a FOAF link element looks like:



SIOC and APML links uses the same attributes in the same way, so we can use the title attribute to figure out which kind of document it is. All we need is a method that uses regular expressions to retrieve the document URLs from the HTML.


The code

This is a method that finds all the semantic links of a certain type in a HTML string.(click to enlarge)



Continue reading this article.


About the Author:
Mads Kristensen currently works as a Senior Developer at Traceworks located in Copenhagen, Denmark. Mads graduated from Copenhagen Technical Academy with a multimedia degree in 2003, but has been a professional developer since 2000. His main focus is on ASP.NET but is responsible for Winforms, Windows- and web services in his daily work as well. A true .NET developer with great passion for the simple solution.

http://www.madskristensen.dk/
About TheDevWeb
TheDevWeb examines the best tools and techniques to help you keep up with all the latest trends in the fast paced world of web development. Excellence in Development Starts Here





TheDevWeb is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITmanagementNews.com





-- TheDevWeb is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2008 iEntry, Inc. All Rights Reserved Privacy Policy Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article



Excellence in Development Starts Here TheDevWeb News Archives About Us Feedback TheDevWeb Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact