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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:08:55+00:00 2026-05-31T04:08:55+00:00

Hi all been stuck on this for a while now, not too sure where

  • 0

Hi all been stuck on this for a while now, not too sure where to go from here

i have this xml

<movies>
  <movie>
    <score/>
    <popularity>3</popularity>
    <translated>true</translated>
    <adult>false</adult>
    <language>en</language>
    <original_name>Batman</original_name>
    <name>Batman</name>
    <alternative_name>Batman (1989)</alternative_name>
    <type>movie</type>
    <id>268</id>
    <imdb_id>tt0096895</imdb_id>
    <url>http://www.themoviedb.org/movie/268</url>
    <votes>29</votes>
    <rating>8.1</rating>
    <certification>PG-13</certification>
    <overview>Gotham City: dark, dangerous, 'protected' only by a mostly corrupt police department. Despite the best efforts of D.A. Harvey Dent and police commissioner Jim Gordon, the city becomes increasingly unsafe...until a Dark Knight arises. Jack Napier, one-time enforcer for Boss Grissom, horribly disfigured after a firefight in a chemical factory...who, devoid of the last vestiges of sanity, seizes control of Gotham's underworld as the psychotic, unpredictable Clown Prince of Crime...the Joker.</overview>
    <released>1989-06-23</released>
    <images>
      <image type="poster" url="http://cf2.imgobject.com/t/p/w92/a84j66FTKvobDFdaPEQ7eAQzbWU.jpg" size="thumb" width="92" height="138" id="4ea5d2bca34d4b37d20005c3"/>
      <image type="poster" url="http://cf2.imgobject.com/t/p/w154/a84j66FTKvobDFdaPEQ7eAQzbWU.jpg" size="w154" width="154" height="231" id="4ea5d2bca34d4b37d20005c3"/>
      <image type="poster" url="http://cf2.imgobject.com/t/p/w185/a84j66FTKvobDFdaPEQ7eAQzbWU.jpg" size="cover" width="185" height="278" id="4ea5d2bca34d4b37d20005c3"/>
      <image type="poster" url="http://cf2.imgobject.com/t/p/w342/a84j66FTKvobDFdaPEQ7eAQzbWU.jpg" size="w342" width="342" height="513" id="4ea5d2bca34d4b37d20005c3"/>
      <image type="poster" url="http://cf2.imgobject.com/t/p/w500/a84j66FTKvobDFdaPEQ7eAQzbWU.jpg" size="mid" width="500" height="750" id="4ea5d2bca34d4b37d20005c3"/>
      <image type="poster" url="http://cf2.imgobject.com/t/p/original/a84j66FTKvobDFdaPEQ7eAQzbWU.jpg" size="original" width="1000" height="1500" id="4ea5d2bca34d4b37d20005c3"/>
      <image type="backdrop" url="http://cf2.imgobject.com/t/p/w300/qDNiKJ46kQ6LHo9eyBK8u2QwRpF.jpg" size="thumb" width="300" height="169" id="4ea5d2b0a34d4b37d20005b9"/>
      <image type="backdrop" url="http://cf2.imgobject.com/t/p/w780/qDNiKJ46kQ6LHo9eyBK8u2QwRpF.jpg" size="poster" width="780" height="439" id="4ea5d2b0a34d4b37d20005b9"/>
      <image type="backdrop" url="http://cf2.imgobject.com/t/p/w1280/qDNiKJ46kQ6LHo9eyBK8u2QwRpF.jpg" size="w1280" width="1280" height="720" id="4ea5d2b0a34d4b37d20005b9"/>
      <image type="backdrop" url="http://cf2.imgobject.com/t/p/original/qDNiKJ46kQ6LHo9eyBK8u2QwRpF.jpg" size="original" width="1920" height="1080" id="4ea5d2b0a34d4b37d20005b9"/>
    </images>
    <version>1242</version>
    <last_modified_at>2012-03-05 19:39:45 UTC</last_modified_at>
  </movie>
</movies>

using

       void movie_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
    {
        if (e.Error != null)
            return;
        XElement xmlMovie = XElement.Parse(e.Result);

        listBox1.ItemsSource = from movie in xmlMovie.Descendants("movies")
                               select new MovieItem
                               {
                                   FilmName = movie.Element("movie").Element("alternative_name").Value,
                                   overview = movie.Element("movie").Element("overview").Value,
                                   rating = movie.Element("movie").Element("rating").Value,
                                   filmurl = movie.Element("movie").Element("images").Element("image").Attribute("url").Value
                               };


        listBox2.ItemsSource = from movie in xmlMovie.Descendants("movies")
                               //  where movie.Element("movie").Element("images").Element("image").Attribute("size").Value == "cover"
                               select new MovieItem
                               {
                                   rating = movie.Element("movie").Element("rating").Value
                               };

        var urls = xmlMovie
            .Descendants("image")
            .Where(x => x.Attribute("size").Value == "cover")
            .Select(x => x.Attribute("url").Value)
            .ToArray();

    }

    public class MovieItem
    {
        public string FilmName { get; set; }
        public string overview { get; set; }
        public string Poster { get; set; }
        public string rating { get; set; }
        public string filmurl { get; set; }
    }
}

}

now i am able to get the url off using my select statement and display it correctly but how do i get the url for an image with the size=”cover”

pretty new at all of this trying to learn as i go alone, so any help would be great 😀

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-31T04:08:56+00:00Added an answer on May 31, 2026 at 4:08 am
    var urls =  xmlMovie
        .Descendants("image")
        .Where(x=>x.Attribute("size").Value=="cover")
        .Select(x=>x.Attribute("url").Value)
        .ToArray();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is something I've been stuck on for a while now, and I have
I've been stuck on this for 3 days now. I have two pages that
I have been looking for a solution to this problem for a while now
I've been stuck on this for a while now and I can't work out
The rails books and web pages I've been following have all stuck to very
I'm sure you have all been there, you take on a project where there
Inspired by the discussion in this question . We have all been taught that
I've been using LINQ for a while now, but seem to be stuck on
I've been wondering about this one for a while now, so I thought it
I have been altering a query for a while now, reading many posts on

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.