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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:48:32+00:00 2026-05-30T23:48:32+00:00

I am unable to load Xdocument.Load I am unable to load Xdocument.LoadI am unable

  • 0

I am unable to load Xdocument.Load I am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am unable to load Xdocument.Load

   public void AuthorNames(string Uri)
    {

        CredentialCache credentialCache = new CredentialCache();
        credentialCache.Add(
        new Uri("https://www.RESTWEBSERVICESSITE.com"),
        "Basic",
        new NetworkCredential("USERID", "PWD"));


        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Uri);
        request.AllowAutoRedirect = true;
        request.PreAuthenticate = true;
        request.Credentials = credentialCache;
        request.AutomaticDecompression = DecompressionMethods.GZip;

        try
        {
            using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
            {

                XmlReader responseReader = XmlReader.Create(response.GetResponseStream());

                //XmlDocument doc = new XmlDocument();

                **XDocument docs = XDocument.Load();**

               // responseReader.Read();
                //XDocument docs = XDocument.Load(response.GetResponseStream());


          List<string> books = docs.Descendants("INTEL")
          // Not really necessary, but makes it simpler
        .Select(x => new {
           Title = (string) x.Element("TITLE"),
           Author = x.Element("INTEL_AUTH")
           })
      .Select(x => new {
           Title = x.Title,
           FirstName = (string) x.Author.Element("FNAME"),
           MiddleInitial = (string) x.Author.Element("MNAME"),
           LastName = (string) x.Author.Element("LNAME"),
        })
   .Select(x => string.Format("{0}: {1} {2} {3}",
                           x.Title,
                           x.FirstName, x.MiddleInitial, x.LastName))
   .ToList();

   for (int i = 0; i < books.Count; i++)
   {
    for (int j = 0; j < books.Count; j++)
    {
    Response.Write("--" + books[i] + "---" + books[j]);
    }
   }

}

        }
        catch (Exception ex)
        {
            Response.Write("Remote server Returned an Error.");
        }
    }

I am unable to load xdocument.Load with the XML feed.

  • 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-30T23:48:34+00:00Added an answer on May 30, 2026 at 11:48 pm

    It’s not clear exactly what you want, but I suspect it’s something like this:

    XDocument doc = ...; // However you want to load this.
    // Note: XML is case-sensitive, which is one reason your code failed before
    List<string> books = doc
        .Descendants("Intel")
        // Not really necessary, but makes it simpler
        .Select(x => new {
                   Title = (string) x.Element("Title"),
                   Author = x.Element("Intel_auth")
                })
        .Select(x => new {
                   Title = x.Title,
                   FirstName = (string) x.Author.Element("fname"),
                   MiddleInitial = (string) x.Author.Element("mname"),
                   LastName = (string) x.Author.Element("lname"),
                });
        .Select(x => string.Format("{0}: {1} {2} {3}",
                                   x.Title,
                                   x.FirstName, x.MiddleInitial, x.LastName))
        .ToList();
    

    This will give you a List<string> where each element is something like “Test 1: John M. pp”.

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

Sidebar

Related Questions

I renamed the class classBattle to Game and not I get Unable to load
I'm unable to get this jquery statement to work on page load but it
I am unable to load an XML file into a JavaScript Document in Google
I'm unable to correctly create DOM elements using jQuery (1.3.2): var ev_t; $(#add-event).click(function() {
I have read article at https://developer.mozilla.org/en/DOM/element.addEventListener but unable to understand useCapture attribute. Definition there
I am trying o load a custom font in C#, so it is usable
Unable to find a SQL diff tool that meets my needs, I am writing
Error: Unable to read data from the transport connection: A blocking operation was interrupted
I am unable to consume messages sent via ActiveMQ from my Flex client. Sending
I have been unable to receive UDP multicast under VxWorks 5.5. I've joined the

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.