Wednesday, January 9, 2008

Setting Up An XML Feed

One of the questions we're most often asked by training providers is which course submission option is best suited for them.

If you're a small provider with between 1-10 courses, then the manual publish (submit one-by-one), or the bulk publish (bundle your courses in a single spreadsheet and submit altogether) are suitable options.

On the other hand, if you're a medium to large provider and have a database backed website, who frequently updates or adds new courses and schedules, we recommend you set up an XML feed.


So what exactly is an XML feed?

A feed is essentially data that is published in a standardised format, that means you make available your course data in a manner in which learnpipe can understand, and therefore process and index your course data ready for learnpipe users to search. Here is an example feed. You can see that there are a series of elements, within which are further elements describing the attributes of a course, attributes which should be fairly familiar to anyone in the training industry, such as course name, course description and so on. This is the format of the data feed.


One of the main benefits of the XML feed is that it ensures your course listings on learnpipe are accurate and up-to-date. It is also more maintainable than the other submission options - when you change your course data in your system it will automatically be reflected in learnpipe search results. Therefore you won't have to manage your course data in multiple places and will still have all the benefits of having your courses listed on learnpipe.


Now how about actually setting up a feed?

There are two approaches you can take:

  1. Use ETL (Extraction, Transformation and Loading) software.
  2. Develop the feed yourself.

Whichever you choose, you'll need to be, or have the assistance of, a web admin or developer.

ETL software will allow you to map your database to an XML schema (we provide the schema) which enables you to produce an XML output of your database in learnpipe's format. The good thing is you can schedule the application to produce an XML output periodically to ensure the feed is kept up-to-date.

There are several open source ETL solutions available, and we recommend the use of Jitterbit, which has a user-friendly drag and drop interface. You can view our Jitterbit tutorial here.


Some vendors, if they have the means, might be more comfortable with developing the feed themselves. It's difficult to provide a 'one size fits all' solution in this scenario as it largely depends on the system of a particular vendor - which programming language you use, web technology, etc. However, common programming languages all have libraries that make accessing your database and handling XML simple and it should be relatively easy for any experienced developer to implement. Take a look at our developer guide here.


Whichever method you choose you'll first need to analyse your database schema and decide which tables and columns best map to learnpipe’s xml schema. For example, if you have a 'course' table, this will naturally map to the element in the learnpipe schema, a 'course_name' column will map to the element, and so on.

Once implemented you'll then need to schedule your program to output a new feed at regular intervals to ensure your feed contains the latest data. If you develop the feed yourself then another approach might be to generate the XML each time the feed URL is accessed, using a PHP script for example.


Finally, if you intend to publish courses on learnpipe you should create a Vendor account, details here. You can't submit your feed without having an account! Once you have access you can submit your feed by selecting the 'XML Feed' option in the profile menu.

Hopefully the above makes things more clear although I've deliberately attempted to be as none 'techie' as possible! - but as always, if you have any questions or need help publishing your courses you can contact us on: info@learnpipe.com. And that goes for any feedback you may have - we're eager to make course publication as easy and simple as possible!