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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:24:18+00:00 2026-06-13T08:24:18+00:00

My current LINQ query and example XML are below. What I’d like to do

  • 0

My current LINQ query and example XML are below. What I’d like to do is select the primary image urls from the as well as the other attributes such as trim, body, make, model, etc.

What is the best way to do this?

<response>
<objects>
    <object>
        <trim>LT</trim>
        <body>4dr Car</body>
        <warranty_miles />
        <color>WHITE</color>
        <selling_price>0.00</selling_price>
        <vin>1g1jc5sh3c4198042</vin>
        <has_service_contract >False</has_service_contract>
        <year>2012</year>
        <alt_id></alt_id>
        <stock_num>1205362</stock_num>
        <has_warranty>False</has_warranty>
        <warranty_month />
        <make>CHEVROLET</make>
        <date_manufactured />
        <interior_color>Dark Pewter/Dark Titanium</interior_color>
        <date_updated>2012-10-17</date_updated>
        <date_dealer_created>2012-06-06</date_dealer_created>
        <certification_warranty />
        <status/>
        <vevo></vevo>
        <image_urls>
            <object>
                <url>http://content.homenetiol.com/1593/69025/640x480/1764e186eabe4ae892f6230107b862cf.jpg</url>
                <resource_uri></resource_uri>
            </object>
            <object>
                <url>http://content.homenetiol.com/1593/69025/640x480/3eeb7050770849e8937191d09453d936.jpg</url>
                <resource_uri></resource_uri>
            </object>
            <object>
                <url>http://content.homenetiol.com/1593/69025/640x480/7f6c1f172f7b4944ac2d165c0dfbcb09.jpg</url>
                <resource_uri></resource_uri>
            </object>
            <object>
                <url>http://content.homenetiol.com/1593/69025/640x480/82d242ba07bb4bb9a7c8514ea1aadae7.jpg</url>
                <resource_uri></resource_uri>
            </object>
            <object>
                <url>http://content.homenetiol.com/1593/69025/640x480/93e3cac89d0f4872b86acd9c2d94695a.jpg</url>
                <resource_uri></resource_uri>
            </object>
            <object>
                <url>http://content.homenetiol.com/1593/69025/640x480/edec4ffe9b2349ffabea9dcb25a78d1e.jpg</url>
                <resource_uri></resource_uri>
            </object>
            <object>
                <url>http://content.homenetiol.com/1593/69025/640x480/f2c1dbb15fec4cf6a62b7842db22763a.jpg</url>
                <resource_uri></resource_uri>
            </object>
            <object>
                <url>http://content.homenetiol.com/1593/69025/640x480/fa7341e250654533a9de2a756d4274eb.jpg</url>
                <resource_uri></resource_uri>
            </object>
          </image_urls>
       </object>
   </objects>
 </response>

Here is what I have so far

        var users = from m in main2.Elements("object")
                    select new Inventory 
                    {
                        Make = (string)m.Element("make"),
                        Year = (string)m.Element("year"),
                        Model = (string)m.Element("model"),
                    };
  • 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-13T08:24:19+00:00Added an answer on June 13, 2026 at 8:24 am

    You want to project the collection of objects under the image_urls node into a list.

    This will project it into a list of strings.

    select new Inventory
    {
        Make = (string)m.Element("make"),
        Year = (string)m.Element("year"),
        Model = (string)m.Element("model"),
        Urls = m.Element("image_urls").Elements().Select(e => (string)e.Element("url"))
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My current LINQ query and example XML are below. What I'd like to do
Simple LINQ query: from transport in db.Transports select new { Current = transport.CurrentLocation, CurrentCarriers
Current version of Twiiter has a tab bar as shown below. When I select
I created a dictionary from a Linq query result as suggested from stackoverflow questions
A followup to this previous question: Current code: var query = from b in
Looking for linq query to fill a list with month + year for example
I have a LINQ query mapped with the Entity Framework that looks something like
according to my requirement i manage to get a linq query from this site
I'd like to filter the result that after Linq query. and make it to
I try to create some linq query like following. I have a table with

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.