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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:53:34+00:00 2026-06-09T17:53:34+00:00

I am Using JAXB , and this is my XML Request and the below

  • 0

I am Using JAXB , and this is my XML Request and the below is the Biding class

<request user="123" Katha="456" />


@XmlRootElement(name = "request")
@XmlAccessorType(XmlAccessType.FIELD)
public class Postdata {

    @XmlAttribute
    private String user;

    @XmlAttribute
    private String Katha;

    // Getters and Setters 

}

The above works fine .

Right now we have change in the Request XML which will be in

<request user="123" Katha="456"> 
    <Specifier name = "One"/>
    <Specifier name = "Two" />
    <Specifier name = "Three" />
</request>

SO please tell me during Unmarshalling process is it possible to include the Specifier as a collection into my Jaxb class ??

@XmlRootElement(name = "request")
@XmlAccessorType(XmlAccessType.FIELD)
public class Postdata {

    @XmlAttribute
    private String user;

    @XmlAttribute
    private String Katha;

    // Getters and Setters 



@XmlElemet
    private List<Specifier> 

Can i do the above way ??

Please let me know ??

}

  • 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-09T17:53:36+00:00Added an answer on June 9, 2026 at 5:53 pm

    You can map your use case as follows:

    Postdata

    @XmlRootElement(name = "request")
    @XmlAccessorType(XmlAccessType.FIELD)
    public class Postdata {
    
        @XmlAttribute
        private String user;
    
        @XmlAttribute(name="Katha")
        private String Katha;
    
        @XmlElement(name="Specifier")
        private List<Specifier> specifiers;
    
        // Getters and Setters 
    
    }
    

    For More Information

    • http://blog.bdoughan.com/2010/09/jaxb-collection-properties.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're parsing an XML document using JAXB and get this error: [org.xml.sax.SAXParseException: Invalid byte
I'm using JAXB for quick-and-dirty XML generation. I have a class that represents a
I'm using jaxb to generate java object class from xml schemas within an Ant
I have this schema and i'm using JAXB to generate java stub files. <?xml
I have always been using jaxb for parsing XML files into java object. This
I am doing this using JAXB to unmarshall some XML into Java objects: My
I am using jaxb for the Unmarshalling Process This is my Request <kiran acct
I am using JAXB XMLadapter to marshal and unmarshal Boolean values. The application's XML
I am using JAXB 2.0 JDK 6 in order to unmarshall an XML instance
Possible Duplicate: Best XML Parser for PHP Using JAXB with Google Android I need

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.