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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:39:02+00:00 2026-06-17T03:39:02+00:00

I use MS Studio 2010 Express for Windows Phone to build the app. In

  • 0

I use MS Studio 2010 Express for Windows Phone to build the app. In my app, I got the http respond and read it in string then I deserializer into the class object. It works fine in the class without List collection as a property. When it deserializer the class with List property, it got the error like this

Error in line 12 position 5. Expecting state  'Element'.. Encountered 'EndElement'  with name  'ContactList', namespace  'http://schemas.datacontract.org/2004/07/DataObjects’.

I think I can read the xml and assign the value into the class. I searched to read xml file and a lot of website mentions to use XDocument .Prase method or xlmDocument.Load. However event adding the System.Xml.Ling as reference , I still cannot see XDocument .Parse method or xlmDocument . Would someone tell me what I should do in order to assign the following value into the class?

There is my class object:

public class CallDetails
{
    public int id { get; set; }
    public string summary { get; set; }
    public string errorMsg { get; set; }
    public int parentCallid { get; set; }
    public string parentCallURL { get; set; }
    public string assignedTo { get; set; }
    public string OrgName { get; set; }
    public DateTime onHoldSince { get; set; }
    public DateTime onHoldUntil { get; set; }
    public string requester { get; set; }
    public bool isOnHold { get; set; }
    private List<Contact> m_ContactList = new List<Contact>();

    public List<Contact> ContactList
    {
        get { return m_ContactList; }

    }
}

There is the respond:

<?xml version="1.0" encoding="utf-8"?><CallDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DataObjects">
<ContactList>
      <Contact>
          <Method>PriPhone</Method>
          <Number>(604) 555-1234</Number>
      </Contact>
      <Contact>
          <Method>Fax</Method>
          <Number>(604)555-1234</Number>
      </Contact>
  </ContactList>
  <errorMsg
      i:nil="true" />
  <id>0</id>
  <isOnHold>false</isOnHold>
  <onHoldSince>0001-01-01T00:00:00</onHoldSince>
  <onHoldUntil>0001-01-01T00:00:00</onHoldUntil>
  <parentCallURL>/Call/349551</parentCallURL>
  <parentCallid>0</parentCallid>
  <requester>Peter </requester>  
  <summary>Mobile Application Research</summary>
</CallDetails>
  • 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-17T03:39:03+00:00Added an answer on June 17, 2026 at 3:39 am

    Just adding the reference to System.Xml.Linq won’t do it, you also need to reference the namespace in the class header:

    using System.Xml.Linq;
    

    Then you can call something like XDocument doc = XDocument.Parse(content);. However, from what I can tell, you are trying to deserialize data, so you might want to use the XmlSerializer class instead for all the core work. You can find some code ‘ispiration’ here.

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

Sidebar

Related Questions

I devloping application for Windows Phone I use Visual Studio express 2010 c# for
Taken from Exercise 1: Creating Windows Phone Applications with Microsoft Visual Studio 2010 Express
ok i just upgrade it to visual studio c++ 2010 express. when i use
Is Windows Phone 7 Development SDK available for other versions of Visual Studio 2010
I'm trying to use Visual Studio Express 2010 to write an openGL program, so
I got Visual Studio 2010 Express C# Edition. I'm using WinXP as OS. How
I'm a beginner starting to use Microsoft Visual C++ Express 2010 for Windows Programming.
I am wondering if I can use VB.NET(I am using visual studio 2010 express)
I'm trying to use visual studio 2010. But it seems that the .sln file
Does anyone know if it is possible to use Visual Studio 2010 RC with

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.