in Education by
I have an XML document which basically looks like this: SomeSeller 2535 Now I'm trying to parse the document like following: var document = XDocument.Parse(upcList); XNamespace ns = "urn:ebay:apis:eBLBaseComponents"; var result= document .Descendants(ns + "Item") .Select(item => new CustomClass { FeedBackScore = Convert.ToInt32(item.Descendants(ns+ "Seller") .Where(p=>p.Name.LocalName=="FeedbackScore").FirstOrDefault()), Sales = (int) item.Element(ns+"QuantitySold"), Location = (string)item.Element(ns+"Location"), CurrentPrice = (double)item.Element(ns + "CurrentPrice"), Title = (string)item.Element(ns + "Title"), ItemID = (string)item.Element(ns + "ItemID") }).ToList(); Please note this part how I try to parse the FeedbackScore node value: FeedBackScore = Convert.ToInt32(item.Descendants(ns+ "Seller") .Where(p=>p.Name.LocalName=="FeedbackScore").FirstOrDefault()), But when I try to parse it I'm getting all "FeedbackScore" nodes values as "0" :( Can someone tell me what am I doing wrong and how can I fetch this value inside this node "2535"? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
FeedBackScore = Convert.ToInt32(item.Descendants(ns + "FeedbackScore").Value)

Related questions

0 votes
    I have two submit buttons and a few textboxes on my page. When I enter details in the textbox and hit ... model.FirsttName) @Html.TextBoxFor(model => model.LastName) Get History...
asked May 22, 2022 in Education by JackTerrance
0 votes
    Description: I have a solution in Visual Studio which has multiple projects as application layers. Business Logic ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I have two submit buttons and a few textboxes on my page. When I enter details in the textbox and hit ... model.FirsttName) @Html.TextBoxFor(model => model.LastName) Get History...
asked May 17, 2022 in Education by JackTerrance
0 votes
    Description: I have a solution in Visual Studio which has multiple projects as application layers. Business Logic ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
0 votes
    I have two submit buttons and a few textboxes on my page. When I enter details in the textbox and hit ... model.FirsttName) @Html.TextBoxFor(model => model.LastName) Get History...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I am inserting JSON string into table, than on listing page in View inside foreach loop I want to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 9, 2022 in Education by JackTerrance
0 votes
    I have been developing a webpage which uses n number of dropdownlists which are binding dynamically inside a ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    I've got a Sharepoint WebPart which loads a custom User Control. The user control contains a Repeater which ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 22, 2022 in Education by JackTerrance
0 votes
    I've got a Sharepoint WebPart which loads a custom User Control. The user control contains a Repeater which ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I've got a Sharepoint WebPart which loads a custom User Control. The user control contains a Repeater which ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I've got a Sharepoint WebPart which loads a custom User Control. The user control contains a Repeater which ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I'm having a small issue with setting the initial value of a dropdown. The code below is the view ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    I have a viewmodel with an Id property [Required] public int Id { get; set; } But I think this ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    I have a viewmodel with an Id property [Required] public int Id { get; set; } But I think this ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    I am using MQTT client library from this link https://www.hivemq.com/blog/mqtt-client-library-encyclopedia- ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 9, 2022 in Education by JackTerrance
...