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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:28:12+00:00 2026-05-29T22:28:12+00:00

Hi all i’m struggling a bit with trying to use Linq to extract data

  • 0

Hi all i’m struggling a bit with trying to use Linq to extract data from the following piece of XML:

<?xml version='1.0' encoding='utf-8'?>
<ReachResponseEnvelope>
  <BPTResponse>
    <QuotePricing xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xmlns:xsd='http://www.w3.org/2001/XMLSchema' CustomerId='2478'
    CustomerQuoteRefNo='' BPTQuoteRefNo='1185129' Product='NNE'
    ResponseCode='P0001' IsQuickQuote='true'
    xmlns='http://www.infoaxon.com/BPT/Services/Schemas/'>
      <TotalPricing>
        <InstallRevenue>2380</InstallRevenue>
        <RentalRevenue>10620</RentalRevenue>
        <AncillaryCharges>
          <Install>0</Install>
          <Rental>0</Rental>
        </AncillaryCharges>
        <QosCost>
          <Install>0</Install>
          <Rental>0</Rental>
        </QosCost>
        <ReportingCost>
          <Install>0</Install>
          <Rental>0</Rental>
        </ReportingCost>
        <TariffSummary>13000</TariffSummary>
      </TotalPricing>
    </QuotePricing>
  </BPTResponse>
</ReachResponseEnvelope>

I’ve got the following piece of Linq, i can get into the QuotoPricing node but struggling to get say the InstallRevenue value. Any help would be hugely appreciated!!

var v = from page in requestResponses.Elements("ReachResponseEnvelope").Elements("BPTResponse")
select page;

foreach (var record in v)
{
//Struggling here!!!
}
  • 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-29T22:28:13+00:00Added an answer on May 29, 2026 at 10:28 pm

    Add XNamespace

     XNamespace ns = "http://www.infoaxon.com/BPT/Services/Schemas/";
     var v = from page in doc.Elements("ReachResponseEnvelope").Elements("BPTResponse")
                        select page;
    
     foreach (var record in v)
     {
      var installRevenueElement = record.Element(ns+ "QuotePricing").Element(ns+ "TotalPricing").Element(ns + "InstallRevenue");
      Console.WriteLine(installRevenueElement.Value);
     } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I'm trying to use the jQuery Form Validator (http://docs.jquery.com/Plugins/Validation). However I'd like to
All, Say I have the following bit of code: select: function(start, end, allDay) {
All, I have the following code: $fetch = mysql_query(SELECT * FROM calendar_events where event_status='booked'
All I am trying to create an app that start capturing the video from
all, I am making a game in which a sprite is move from one
all, The code below comes from Advanced Programing in Unix Environment, it creates a
I am trying to understand how to use SyndicationItem to display feed which is
All programs that I develop utilize the default Windows Design template: Besides from changing
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
All, I am trying to create a table to receive user inputs (UGC). This

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.