EasyRdf Rdfa Parser

7 views
Skip to first unread message

jaures styve Kameni Homte

unread,
Feb 5, 2018, 6:26:43 AM2/5/18
to EasyRdf Discussion
Hi, 

I am trying to parse rdfa and get rdfxml result. 

Here is my code : 

       $graph = new EasyRdf_Graph('http://prowebcreation.fr/exemple3.html');

       $graph->load('http://prowebcreation.fr/exemple3.html', 'rdfa');

        // Lookup the output format
        $format = EasyRdf_Format::getFormat('rdfxml');

        // Serialise to the new output format
        $output = $graph->serialise($format);
        if (!is_scalar($output)) {
            $output = var_export($output, true);
        }
        
        print '<pre>'.htmlspecialchars($output).'</pre>';

The problem is : I have some datatype rdf:HTML, but the parser strips my tags, example : for <p  property="htmlContent" datatype="rdf:HTML" >content <strong>of</strong> notion2</p>, 

Instead to have : "content <strong>of</strong> notion2" as value of htmlContent, I have "content of notion2"
Reply all
Reply to author
Forward
0 new messages