I did. I also read a tutorial given in the following link.
http://jena.sourceforge.net/tutorial/RDF_API/#ch-Jena RDF Packages
But then, I am not able to read the values and store it in a string in a
servlet.
This is what I have done so far.
//read the file into a model
model.read(files, null);
//read the domain
Resource vcard = model.getResource("http://www.wordpress.com/blogs/" +
files);
String domain = vcard.getProperty(RDF.subject).getString();
If the input file is the following,
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
<rdf:Description rdf:about="http://www.wordpress.com/blogs/jhbh">
<rdf:subject>Data structures</rdf:subject>
<rdf:object></rdf:object>
<rdf:value>hbl</rdf:value>
</rdf:Description>
</rdf:RDF>
I want the String domain to be "Data Structures".
How should I do that??
I want to open an RDF file and read the value of an element in that file.
It sounds simple. But i am not able to get it.