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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:22:05+00:00 2026-06-01T18:22:05+00:00

I need to add links to my resteasy api xml and json output. So

  • 0

I need to add links to my resteasy api xml and json output.
So I wrote a JAXB AtomLink class as follows

package samples;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name="link", namespace="http://www.w3.org/2005/Atom")

public class AtomLink {
    private String rel;
    private String href;
    private String type;

    public AtomLink() {}

    public AtomLink(String rel, String href, String type) {
        this.rel = rel;
        this.href = href;
        this.type = type;
    }

    public AtomLink(String rel, String href) {
        this(rel,href,"application/xml");
    }

    @XmlAttribute
    public String getRel() {
        return rel;
    }
    public void setRel(String rel) {
        this.rel = rel;
    }

    @XmlAttribute
    public String getHref() {
        return href;
    }
    public void setHref(String href) {
        this.href = href;
    }

    @XmlAttribute
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }

}

and set the link values in my JAXB xml or json object.
I got the output as follows. But the links are not clickable.

output:

<data xmlns:ns2="http://www.w3.org/2005/Atom">
<bucket id="2" name="2012-APR-09 12:05 AM">
<av_data unit="percent" value="100"/>
<data_count unit="#" value="10"/>
<pf_data unit="seconds" value="4.618"/>
</bucket>
<ns2:link href="http://localhost:8080/webapp/api/getrawdata?start=3&size=2" rel="next" type="application/xml"/>
</data>

What should i do to make the links clickable.

Thanks in advance.
Anitha

  • 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-01T18:22:06+00:00Added an answer on June 1, 2026 at 6:22 pm

    XML and JSON are just text based representations of data. The ability to click on a link depends upon the browser you are using to view the data ability to recognize a portion of that text as a link and render it as a hyperlink.

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

Sidebar

Related Questions

I need to add links to WordPress Posts on a static HTML page. I
I need to make a table such that the user can add attachment links
using a twitter display widget and need to add links to the hash tags.
I have a varying number of links that I need to add to a
Interesting dilemma here. I need the ability for users to add links from their
I am using drop-down menus with my main navigation links and need to add
I want to add canonical links to my pages, but do I need to
I am writing a Visual Basic IDE, and I need to add lines numbers
I need to add two lines of html to every page on a large
I find the documents frustrating. What are the basic lines I need to add

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.