Go
Http://www.seasr.org/wp-content/plugins/meandre/rdfapi-php/doc/index.html
Download an rdf api for PHP and decompress it to the directory.
E:/siren/rdfapi-PHP
This instance outputs the existing RDF file ..
My directory contains example1.rdf
The content is as follows:
<? XML version = "1.0"?>
<RDF: RDF
XML: base = "http://www.w3.org/Home/Lassila.rdf"
Xmlns: RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns"
Xmlns: DC = "http://purl.org/dc/elements/1.1"
Xmlns: Ex = "http://example.org/stuff/1.0"
Xmlns: S = "http://description.org/schema/">
<RDF: Description
RDF: About = "http://www.w3.org/Home/Lassila">
<S: Creator>
<RDF: Description RDF: nodeid = "b85740">
<RDF: Type
RDF: Resource = "http://description.org/schema/Person"/>
<Ex: Name
RDF: datatype = "http://www.w3.org/TR/xmlschema-2#string"> ora
Lassila </EX: Name>
<Ex: email> lassila@w3.org </EX: email>
</RDF: Description>
</S: Creator>
</RDF: Description>
</RDF: RDF>
PHPProgramAs follows:
<? PHP
/**
* @ Author [person]
* @ Date 2010/6/1/
*@
*
*/
Define ("rdfapi_include_dir", "E:/siren/rdfapi-PHP/API /");
Include (rdfapi_include_dir. "rdfapi. php ");
// File name
$ Base = "example1.rdf ";
// Create an instance
$ Model = modelfactory: getdefaultmodel ();
// Load the file
$ Model-> load ($ base );
// Output html
$ Model-> writeashtmltable ();
?>
Run the command to view the output result.