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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:06:16+00:00 2026-06-02T08:06:16+00:00

I am working with below mentioned structure where i have classes in that i

  • 0

I am working with below mentioned structure where i have classes in that i have list of classes with a class name. Each class has its mapping.

I need to query this using rest sharp from a rest service.

 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
  <Response status="Success">
  <Classes>
  <Class className="Library">
  <ClassMappings>   
  < ClassMapping key="cls1" /> 
  < ClassMapping key="cls2" /> 
  < ClassMapping key="cls3" /> 
  </ ClassMappings>
  </ Class>
  < Class className="Staff">
  </ Class>
    .
    .
    .
  </Classes>

I have designed this classes but its not giving me mappings properly.

public class Class
{
    public string className { get; set; }
    //public ClassMappings Mappings { get; set; }
    public List<ClassMapping> Mappings { get; set; }
}

public class Classes : List<Class> { }

//public class ClassMappings //: List<ClassMapping>
//{
//    public List<ClassMapping> ClassMapping { get; set; }
//}

public class ClassMapping
{
    public string key { get; set; }
}

You can see i have already tried the commented code also. Where class mappings is a different class.

Can anyone help me designing classes for rest call.

Thanks

  • 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-02T08:06:19+00:00Added an answer on June 2, 2026 at 8:06 am

    The array should be named ClassMappings instead of Mappings.

    As a general solution you could load the xml as a generic object and then use the debugger to see the correct structure.

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

Sidebar

Related Questions

I am working on a multi-select drop-down menu mentioned below <select class=form-input name=hideLineItemColumns_quote multiple=true
Code below is working well as long as I have class ClassSameAssembly in same
I have below a working query that needs to be simplified. The reason is
the below mentioned code is working perfectly, that when clicking the thumbnail the larger
Video not working properly in the below mentioned code. What could be the problem
I have a problem set for my programming class which I'm working on. The
I have five textboxes in same order as mentioned below with IDs txtFirstName txtLastName
The problem mentioned below has been solved and code has been changed to reflect
I have used threading in my web application which I have mentioned below: var
I have a stored procedure mentioned as below. I'm using SQL Server 2008 R2.

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.