[rdfweb-dev] Parsing FOAF in perl?

Ian Davis iand at i...
Fri Dec 6 09:56:22 UTC 2002

On Thursday, 05 December 2002 at 21:16, Dougal Campbell wrote:
> Does anyone have any suggestions for parsing FOAF in Perl?
I've been using RDF::Core::Parser

> I was looking at RDF::Core::Parser, but when I tried to use it on my
> FOAF, it died with:

> Element 'mbox' can not contain a literal value at line 9 at
> D:/Misc/Perl/site/lib/RDF/Core/Parser.pm line 863
Can you send a url for the FOAF so we can have a look at it?

> Should I be looking at a more generic XML parser? XML::Simple? XML::SAX?
> XML::TreeBuilder?
No. Steer clear of anything that is not an RDF parser. You can get
away with it for RSS (don't shout at me Bill!) but FOAF, by intention,
is going to contain extensive RDF constructs that you won't be able to
handle with a straight XML parser.

> At some point I'll probably want to be writing FOAF (automagically
> creating FOAF from scraping an HTML source), as well as parsing it.


More information about the foaf-dev mailing list