Question

I'm working with Open Calais and am trying to parse RDF/XML data that's being returned from the API. I can't make my own parser because the data for the same type is sometimes different depending on how much info there is-

<!--PersonCareer: person: Bill Gates; company: Microsoft; careertype: professional; status: past; -->

vs

<!--PersonCareer: person: Margaret Cushing; position: president and chief executive officer; company: Hewlett-Packard; careertype: professional; status: current; -->

What I want to be able to do is to parse this RDF data using the ontology document Open Calais provides - http://www.opencalais.com/files/owl.opencalais-4.3a.xml. I need help with actually how to parse this data using the ontology xml doc using c#. Any help would be appreciated! :)

Was it helpful?

Solution

If you want to parse RDF in C#, you would be best to use an existing RDF library such as dotNetRDF.

Incidentally, your code samples are confusing because you've only pasted XML comments. No RDF parser that I know of will do anything other than ignore comments.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top