1

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! :)

dudebroman
  • 256
  • 2
  • 4
  • 12

1 Answers1

3

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.

Ian Dickinson
  • 12,875
  • 11
  • 40
  • 67
  • Haha I didn't realize they were comments until a couple hours ago. I just went with a JSON approach... but thanks anyway :) – dudebroman Jul 27 '12 at 16:22