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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:34:41+00:00 2026-06-13T10:34:41+00:00

Possible Duplicate: Amazon Marketplace XML parsing I am new to parsing XML in C#

  • 0

Possible Duplicate:
Amazon Marketplace XML parsing

I am new to parsing XML in C# and I have some data from Amazon MWS library that is displayed below. I need to parse out various ItemAttributes such as ItemDimensions. I am use to JSON responses so I am not sure how to apply this to XML. Would it be possible from someone to point me in the right direction? I have Googled XML Parsing with C# but not valuable results were found to help me complete my tasks.

<GetMatchingProductResponse xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01">
<GetMatchingProductResult ASIN="1430225491" status="Success">
  <Product>
    <Identifiers>
      <MarketplaceASIN>
        <MarketplaceId>ATVPDKIKX0DER</MarketplaceId>
        <ASIN>1430225491</ASIN>
      </MarketplaceASIN>
    </Identifiers>
    <AttributeSets>
      <ns2:ItemAttributes xml:lang="en-US">
        <ns2:Author>Troelsen, Andrew</ns2:Author>
        <ns2:Binding>Paperback</ns2:Binding>
        <ns2:Brand>Apress</ns2:Brand>
        <ns2:Edition>5</ns2:Edition>
        <ns2:ItemDimensions>
          <ns2:Height Units="inches">9.21</ns2:Height>
          <ns2:Length Units="inches">7.48</ns2:Length>
          <ns2:Width Units="inches">2.52</ns2:Width>
          <ns2:Weight Units="pounds">5.80</ns2:Weight>
        </ns2:ItemDimensions>
        <ns2:IsAutographed>false</ns2:IsAutographed>
        <ns2:IsEligibleForTradeIn>true</ns2:IsEligibleForTradeIn>
        <ns2:IsMemorabilia>false</ns2:IsMemorabilia>
        <ns2:Label>Apress</ns2:Label>
        <ns2:Languages>
          <ns2:Language>
            <ns2:Name>english</ns2:Name>
            <ns2:Type>Unknown</ns2:Type>
          </ns2:Language>
          <ns2:Language>
            <ns2:Name>english</ns2:Name>
            <ns2:Type>Original Language</ns2:Type>
          </ns2:Language>
          <ns2:Language>
            <ns2:Name>english</ns2:Name>
            <ns2:Type>Published</ns2:Type>
          </ns2:Language>
        </ns2:Languages>
        <ns2:ListPrice>
          <ns2:Amount>59.99</ns2:Amount>
          <ns2:CurrencyCode>USD</ns2:CurrencyCode>
        </ns2:ListPrice>
        <ns2:Manufacturer>Apress</ns2:Manufacturer>
        <ns2:NumberOfItems>1</ns2:NumberOfItems>
        <ns2:NumberOfPages>1752</ns2:NumberOfPages>
        <ns2:PackageDimensions>
          <ns2:Height Units="inches">2.60</ns2:Height>
          <ns2:Length Units="inches">9.20</ns2:Length>
          <ns2:Width Units="inches">7.50</ns2:Width>
          <ns2:Weight Units="pounds">5.80</ns2:Weight>
        </ns2:PackageDimensions>
        <ns2:PartNumber>9781430225492</ns2:PartNumber>
        <ns2:ProductGroup>Book</ns2:ProductGroup>
        <ns2:ProductTypeName>ABIS_BOOK</ns2:ProductTypeName>
        <ns2:PublicationDate>2010-05-14</ns2:PublicationDate>
        <ns2:Publisher>Apress</ns2:Publisher>
        <ns2:SmallImage>
          <ns2:URL>http://ecx.images-amazon.com/images/I/51h9Sju5NKL._SL75_.jpg</ns2:URL>
          <ns2:Height Units="pixels">75</ns2:Height>
          <ns2:Width Units="pixels">61</ns2:Width>
        </ns2:SmallImage>
        <ns2:Studio>Apress</ns2:Studio>
        <ns2:Title>Pro C# 2010 and the .NET 4 Platform</ns2:Title>
      </ns2:ItemAttributes>
    </AttributeSets>
    <Relationships/>
    <SalesRankings>
      <SalesRank>
        <ProductCategoryId>book_display_on_website</ProductCategoryId>
        <Rank>43011</Rank>
      </SalesRank>
      <SalesRank>
        <ProductCategoryId>697342</ProductCategoryId>
        <Rank>36</Rank>
      </SalesRank>
      <SalesRank>
        <ProductCategoryId>3967</ProductCategoryId>
        <Rank>53</Rank>
      </SalesRank>
      <SalesRank>
        <ProductCategoryId>4013</ProductCategoryId>
        <Rank>83</Rank>
      </SalesRank>
    </SalesRankings>
  </Product>
</GetMatchingProductResult>
<ResponseMetadata>
  <RequestId>440cdde0-fa76-4c48-bdd1-d51a3b467823</RequestId>
</ResponseMetadata>
</GetMatchingProductResponse>
  • 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-13T10:34:42+00:00Added an answer on June 13, 2026 at 10:34 am

    I find “Linq To Xml” easier to use

    var xDoc = XDocument.Parse(xml); //or XDocument.Load(filename);
    XNamespace ns = "http://mws.amazonservices.com/schema/Products/2011-10-01";
    var items = xDoc.Descendants(ns + "ItemAttributes")
                    .Select(x => new
                    {
                        Author = x.Element(ns + "Author").Value,
                        Brand = x.Element(ns + "Brand").Value,
                        Dimesions = x.Element(ns+"ItemDimensions").Descendants()
                                     .Select(dim=>new{
                                         Type = dim.Name.LocalName,
                                         Unit = dim.Attribute("Units").Value,
                                         Value = dim.Value
                                     })
                                    .ToList()
    
                    })
                    .ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Unrecognized element 'folderLevelBuildProviders'? I've setup a new EC2 Windows instance on Amazon
Possible Duplicate: Parsing XML String in C# How to process the below XML file
Possible Duplicate: Objective C: what is a (id) sender? I have some questions about
Possible Duplicate: Subtract days from a date in javascript I have got a JavaScript
Possible Duplicate: PHP preg_match_all: Extract comma seperated list I have a string that looks
Possible Duplicate: Python : how to append new elements in a list of list?
Possible Duplicate: Can’t create handler inside thread that has not called Looper.prepare() inside AsyncTask
Possible Duplicate: get current latitude and longitude from gps enabled device I use the
Possible Duplicate: Is there some ninja trick to make a variable constant after its
Possible Duplicate: What is 0x10 in decimal? I notice that Console.WriteLine(18); writes 18, but

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.