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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:31:21+00:00 2026-05-28T20:31:21+00:00

I always worked with easy xml structures and simple xaml bindings. Now I am

  • 0

I always worked with easy xml structures and simple xaml bindings. Now I am a bit confused while trying some complex stuff. I was reading this WP7 How to parse the XML? question and its answers but I couldn’t understand the displaying the data part.

I have similar XML Data like this:

<?xml version="1.0"?>
<top>
    <value name="Finals">
        <country home="sweden" away="italy" venue="aaa"/>
    </value>
    <value name="Semi-finals">
        <country home="Germany" away="sweden" venue="ccc"/>
        <country home="france" away="italy" venue="ddd"/>
    </value>
</top>

And the result I want to see is:

Finals
- Sweden - Italy in AAA

Semi-finals
- Germany - France in ccc
- France - Sweden in ddd

Is there a way to do this with Xaml binding stuff. If you have any WP7 tutorial links about this I would be grateful.

  • 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-28T20:31:22+00:00Added an answer on May 28, 2026 at 8:31 pm

    WPF has an XML binding API, however Silverlight for WP7 does not. I would use Linq to XML to create the string you are after.

    Something like this should work …

    NL = System.Environment.NewLine;
    
    doc = XDocument.Parse(xml);
    StringBuilder output = new StringBuilder();
    
    var rounds = doc.Descendants("value");
    foreach(XElement round in rounds)
    {
      builder.Append(round.Attribute("value").Value + NL);
      foreach(XElement country in round.Elements())
      {
        builder.Append(country.Attribute("home").Value);
        builder.Append(" - ");
        builder.Append(country.Attribute("away").Value);
        builder.Append(" in ");
        builder.Append(country.Attribute("venue").Value);
        builder.Append(NL);
      }
    }
    

    See the MSDN documentation for Linq to XML for more details.

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

Sidebar

Related Questions

I've always worked with Windows Forms, but now I'm trying to learn WPF due
Currently I always worked with GIT and was quite satisfied. Due to some project
So this below has always worked for me, but now I need to remove
I've done some url rewriting, always using the Intelligencia.UrlRewriter and it always worked fine.
I've worked on several PHP projects and always I have problems with organizing my
I always believe they did, but seeing some answers here make me doubt... Can
I have a web application, which was designed and always worked under root context
I've always worked alone and my method of testing is usually compiling very often
So far, I almost always worked with no-interface EJBs and have a slight understanding
I've been writing Windows Services for a while and they always seem to work

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.