简体   繁体   中英

XML to RDF : using JENA GRDDL

I want to transform xml files to RDF. I think that JENA GRDDL can be used ,but I don't know how it works ! and I did not found any examples ! can you help me please to start using this API or show me any possible solutions !

You can transform XML files to RDF using XSLT, typically targeting RDF/XML (see, eg, Using jena for creating RDF from XMl file ). Jena can then read the resulting file.

You can even streamline this process and parse the result of the XSLT transformation directly using a SAXResult and SAX2Model .

GRDDL (see the excellent primer ) standardises this procedure. It provides a way to discover an XSLT transformation for a given XML document: either directly using grddl:transformation , or indirectly for a class of documents using xml namespace schemas or html profiles. (see the GRDDL spec for the details)

So GRDDL doesn't really help you as such: you still need to write the transformation for your files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM