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

  • Home
  • SEARCH
  • 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 6678977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:18:21+00:00 2026-05-26T04:18:21+00:00

In wp7 i want to parse xml tag .Xml : <top> <value name=Group A>

  • 0

In wp7 i want to parse xml tag

.Xml :

<top>
<value name="Group A">
<team position="1" name="india" won="10" lose="5"/>
<team position="2" name="pakistan" won="5" lose="5"/>
</value>

<value name="Group B">
<team position="1" name="Aus" won="10" lose="5"/>
<team position="2" name="newzeland" won="5" lose="5"/>
</value>
</top>

i want output like this,

Group A

1  India 10  5
2  pak    5  10

Group B

1  Aus        5    5
2  Neszeland  5   5

I’ m using parser like this,

 list = (from story in xmlTweets.Descendants("value")

                             select new ViewModel
                             {
                                 group= story.Attribute("name").Value,

                             }).ToList();

list1 = (from story in xmlTweets.Descendants("team")

                             select new ViewModel
                             {
                                 position= story.Attribute("position").Value,
name= story.Attribute("name").Value,
won= story.Attribute("won").Value,
lose= story.Attribute("lose").Value,

                             }).ToList();

output:

Group A

Group B

1  India 10  5
2  pak    5  10

1  Aus        5    5
2  Neszeland  5   5

Please tell me some idea to do this.

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-05-26T04:18:21+00:00Added an answer on May 26, 2026 at 4:18 am

    Currently you’ve got two separate lists – one for groups and one for teams. It looks to me like your view model needs to be richer – something like:

    list = xml.Descendants("value")
              .Select(group => new GroupViewModel
              {
                  Group = (string) group.Attribute("name"),
                  Results = group.Elements("team")
                                 .Select(team => new TeamViewModel
                                 {
                                     Position = (int) team.Attribute("position"),
                                     Name = (string) team.Attribute("name"),
                                     Won = (int) team.Attribute("won"),
                                     Lost = (int) team.Attribute("lose")
                                 })
                                 .ToList()
              })
              .ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to consume an XML-RPC service built in PHP for my WP7 app
I want to create WatermarkTextBox in WP7.1 I followed the link http://www.windowsphonegeek.com/articles/WP7-WatermarkedTextBox-custom-control But that
I want to develop an app for WP7 using C# where a user taps
I'm creating MaskedTextBox in WP7.1 In that i want to set the Prompt char
I'm creating the MaskedTextBox in WP7.1 In that i want to select all text
i'm studying wp7 app changing app on https://github.com/slodge/face . I want to change this
I have several xaml pages in a WP7 MVVM project. I want to take
I'm retriving contacts from WP7. Some contacts having images some not having. I want
I want to add Unit Tests to my WP7 project. I followed the tutrials
I'm developing wp7 Mango application. I run PeriodicTask and want to notify user according

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.