Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 799333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:06:33+00:00 2026-05-14T23:06:33+00:00

I am trying to convert the RDF/XML format to JSON format. Is there any

  • 0

I am trying to convert the RDF/XML format to JSON format. Is there any python (library) example that i can look into for this to do ?

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:06:34+00:00Added an answer on May 14, 2026 at 11:06 pm

    You can use rdflib to parse many RDF variants (including RDF/XML), or maybe the simpler rdfparser if it suits your needs. You can then use the standard library Python json module (or equivalently third-party simplejson if you’re using some Python version older than 2.6) to serialize the in-memory structure built with the parser into JSON. I’m not familiar with any package embodying both steps, unfortunately.

    With the example at rdfparser’s site, the overall work would be just…:

    import rdfxml
    import json
    
    class Sink(object): 
       def __init__(self): self.result = []
       def triple(self, s, p, o): self.result.append((s, p, o))
    
    def rdfToPython(s, base=None): 
       sink = Sink()
       return rdfxml.parseRDF(s, base=None, sink=sink).result
    
    s_rdf = someRDFstringhere()
    pyth = rdfToPython(s_rdf)
    s_jsn = json.dumps(pyth)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to convert arguments LPWSTR to LPTSTR, it there any library I can
im trying to convert a date format into a new format in this example
I'm trying convert xml from one format to other using the XslCompiledTransform in c#.
I have an XML file and I'm trying convert it into a (table( HTML
Trying to convert a JSON string into an object in C#. Using a really
Trying to convert a date format into a MySQL date: SELECT STR_TO_DATE('8/3/2011 13:30','%m/%d/%Y %h:%i');
i trying to convert time in string format to minutes. i can use substring
I'm trying to convert a string into a date format My string looks like
Trying to convert a server written in C++ into Python. The server was written
I'm trying convert all special chars into HTML safe entities on their way into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.