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 7884229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:44:34+00:00 2026-06-03T04:44:34+00:00

I have this xml file, how can I create RDF triple from it using

  • 0

I have this xml file, how can I create RDF triple from it using xpath and ModelFactory in java?

<xml>
<person>
<name>Joe</name>
<website url="www.example1.com">contact1</website >
<vote>20</vote>
</person>
<person>
<name>Anna</name>
<website url="www.example2.com">contact2</website>
<vote>80</vote>
</person>
</xml>

Thanks for help


Thanks for replay, I would like to obtain following RDF

 <rdf:Description rdf:about="http://www.example.com/xml">
<j.0:hasCritic>Joe</j.0:hasCritic>
     <rdf:Description rdf:about=Joe >
     <j.0:haswebsite>"www.example1.com"</j.0:haswebsite>
      <j.0:hascontact>contact1</j.0:hascontact>
      <j.0:hasvote>80</j.0:hasvote>
  </rdf:Description>
  <j.0:hasCritic>Anna</j.0:hasCritic>
     <rdf:Description rdf:about=Anna>
     <j.0:haswebsite>"www.example2.com"</j.0:haswebsite>
      <j.0:hascontact>contact2</j.0:hascontact>
      <j.0:hasvote>20</j.0:hasvote>
</rdf:Description>
  • 1 1 Answer
  • 0 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-06-03T04:44:35+00:00Added an answer on June 3, 2026 at 4:44 am
    You can use jena api for creating RDf model. Just parse xml file using dom parser and create Resourse , Property or Literal using Jena API. After creating this simply add into model.
    
    Example:-
    Model rdfModel = ModelFactory.createDefaultModel();
    Resource resourse = rdfModel.createResource(Resourse Text);
    Property property = rdfModel.createProperty(Property Text);
    Literal literal = rdfModel.createLiteral(Literal Text);
    resourse.addLiteral(property,literal);
    

    Using Jena API you can store this model into rdf database(Triple).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have color in the String.xml file like this <color name=ItemColor1>#ffff992b</color> how can i
I have this XML file I need to extract the HTML Code from mono
Let's say I have this XML file: <Names> <Name> <FirstName>John</FirstName> <LastName>Smith</LastName> </Name> <Name> <FirstName>James</FirstName>
I have this data from a xml file: <?xml version=1.0 encoding=utf-8 ?> <words> <id>...</id>
I have this XML file that I parse into its elements and create a
I have this form to upload an xml file to server, I am using
I have a .dll file from a Silverlight class library. How can I create
Can you create a List in a Spring application-context.xml file without using the <list>
i have this xml file: <dist> <key>keynumber1</key> <string>value1</string> <key>keynumber2</key> <string>value2</string> <key>keynumber3</key> <string>value3</string> <key>keynumber4</key> <integer>value4</integer>
I have this XML file <bookstore> <test> <test2/> </test> </bookstore> and this XSD schema

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.