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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:51:06+00:00 2026-05-16T22:51:06+00:00

I’m getting the data from sharepoint wbesite using activeItemData = ws.GetListItems(listGUID, activeItemViewGUID, qNode, vNode,

  • 0

I’m getting the data from sharepoint wbesite using

activeItemData = ws.GetListItems(listGUID, activeItemViewGUID, 
     qNode, vNode, rowLimit, null, "");

Here is what I got from the sharepoint its one record.

<**rs:data** ItemCount="1" ListItemCollectionPositionNext="Paged=TRUE&amp;p_ID=1" xmlns:rs="urn:schemas-microsoft-com:rowset">
   <**z:row** ows_ID="1" ows_Title="My RFC Title number one" ows_GUID="{A73B8E91-98BF-4CA7-8ADB-A3B933D6D8DA}" ows_Req_x0020_Number="112343" ows_Ends="2010-07-17 00:00:00" ows_MetaInfo="1;#" ows__ModerationStatus="0" ows__Level="1" ows_Start="2010-07-08 00:00:00" ows_owshiddenversion="13" ows_UniqueId="1;#{EA9E9C87-1B28-47DE-B7F4-DA4ADDF913F6}" ows_FSObjType="1;#0" ows_Created="2010-07-07 11:05:56" ows_Status="1. In-Work" ows_FileRef="1;#sites/PS/Lists/Change Control/1_.000" xmlns:z="#RowsetSchema" />
</rs:data>

Now to use LINQ to XML I change the object which hold this data from XMLDocument to XDocument by using

XDocument results = XDocument.Parse(activeItemData.OuterXml);

and the problem is that once I try to browse through the data to obtain ID and Title I got the error: Object reference not set to an instance of an object.

Here is the piece of code which I’m trying to use to get those fields:

 var items = from item in results.Descendants(XName.Get("row", "#RowsetSchema"))
       select new
           {
               Title = item.Attribute("Title").Value,
               Id = item.Attribute("ID").Value 
           };

Seems that item is unable to locate this XName element

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-16T22:51:07+00:00Added an answer on May 16, 2026 at 10:51 pm

    Try:

     var items = from item in results.Descendants(XName.Get("row", "#RowsetSchema"))
           select new
               {
                   Title = item.Attribute("ows_Title").Value,
                   Id = item.Attribute("ows_ID").Value 
               };
    

    If you look at the row element:

    <z:row ows_ID="1" ows_Title="My R.....

    you were missing ows_ from the attribute name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JSP page retrieving data and when single or double quotes are
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a bunch of posts stored in text files formatted in yaml/textile (from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker

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.