---
title: LH RDF not just xml anymore
url: https://shawfactor.com/2013/04/13/lh-rdf-not-just-xml-anymore/
date: 2013-04-13T12:24:54+10:00
modified: 2023-02-14T15:29:14+11:00
type: post
category: Programming
---

[LH Rdf](https://wordpress.org/plugins/lh-rdf/ "LH RDF") is back!!

Yes development has started again and the first stop is to add additional formats to the output. Previously Lh Rdf only supported RDF-xml and has been designed almost exclusively around that. Therefore to add other formats I have bundled the [Easyrdf](https://www.easyrdf.org/) library into the plugin. When the query string lhrdf is added to the feed URL the [Easyrdf](https://www.easyrdf.org/) parser is invoked to parse the rdf xml output string and the output is then available in various triple formats.

See code extract:

$graph = new EasyRdf\_Graph();  
$graph-&gt;parse($out,”rdfxml”);  
$data = $graph-&gt;serialise($\_GET\[‘lhrdf’\]);

The format chosen by value of the lhrdf variable E.G. http://localhero.biz/?feed=lhrdf&amp;lhrdf=json

As well as simply being cool, having an option to output JSON is the main benefit as the triples are now no longer imprisoned by the same domain policy.