[rdfweb-dev] lightweight php rdf/xml parser

Julian Bond julian_bond at voidstar.com
Thu Jul 22 17:21:20 UTC 2004


Benjamin Nowack <bnowack at appmosphere.com> wrote:
>my lightweight PHP RDF/XML classes[1] are now available in an
>early version. Please see the announcement on rdf-interest[2]
>for more info. (The parser is currently 25K, the serializer 5K,
>some bits are still missing, though)
>
>I plan to write a grouping/indexing function for the parser
>so that it can be used easier when someone is looking for
>nodes of a certain type (e.g. foaf:Person)

FYI, I just went through the RAP API functions I actually use. I'd be 
looking for at least these in any replacement. Or at least patterns to 
use to replicate them in PHP.

parser->generateModel() //duh!

model->find()
model->findRegex()
model->findFirstMatchingStatement()
model->findCount()

matches->getStatementIterator()
statementIterator->next()
// Or someway to iterate through the find() results

statement->getSubject()
statement->getLabelPredicate()
statement->getObject()
statement->getLabelObject()

Note that findRegex() was needed due to the multiple relationship schema 
in use. It's not very elegant.

-- 
Julian Bond Email&MSM: julian.bond at voidstar.com
Webmaster:                 http://www.ecademy.com/
Personal WebLog:          http://www.voidstar.com/
M: +44 (0)77 5907 2173      T: +44 (0)192 0412 433



More information about the foaf-dev mailing list