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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:58:15+00:00 2026-05-20T08:58:15+00:00

OKay this is just over my head again with these namespaces. I want to

  • 0

OKay this is just over my head again with these namespaces.

I want to take a long XML document and deserialize it down into a list of entity objects. The objects in this case resemble just flat POJOs.

The XML looks like:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
  <Body>
    <QueryResponse xmlns="http://markets.midwestiso.org/dart/xml">
      <DayAheadLMP day="2011-02-25">
        <PricingNode location="AEC">
          <PricingNodeHourly hour="1">
            <LMP>23.1</LMP>
            <MCC>-0.44</MCC>
            <MLC>-0.49</MLC>
            <RegMCP>0</RegMCP>
            <SpinMCP>0</SpinMCP>
            <SuppMCP>0</SuppMCP>
          </PricingNodeHourly>

etc etc..

i have gotten as far as:

var repsonseXML = XDocument.Parse(CallMUI(requestXml, muiUrl));

Which returns my XML as a string and Parses it into the XDocument object

the list objects I want look like:

    /// <summary>
/// There are no comments for MISO.IR.IntegrationModel.LMP_DayAhead in the schema.
/// </summary>
/// <KeyProperties>
/// Location
/// Interval
/// SyncId
/// </KeyProperties>
[global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="MISO.IR.IntegrationModel", Name="LMP_DayAhead")]
[global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)]
[global::System.Serializable()]
public partial class LMP_DayAhead : global::System.Data.Objects.DataClasses.EntityObject
{
    /// <summary>
    /// Create a new LMP_DayAhead object.
    /// </summary>
    /// <param name="location">Initial value of Location.</param>
    /// <param name="interval">Initial value of Interval.</param>
    /// <param name="lMP">Initial value of LMP.</param>
    /// <param name="mLC">Initial value of MLC.</param>
    /// <param name="mCC">Initial value of MCC.</param>
    /// <param name="syncId">Initial value of SyncId.</param>
    [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
    public static LMP_DayAhead CreateLMP_DayAhead(string location, global::System.DateTime interval, decimal lMP, decimal mLC, decimal mCC, int syncId)
    {
        LMP_DayAhead lMP_DayAhead = new LMP_DayAhead();
        lMP_DayAhead.Location = location;
        lMP_DayAhead.Interval = interval;
        lMP_DayAhead.LMP = lMP;
        lMP_DayAhead.MLC = mLC;
        lMP_DayAhead.MCC = mCC;
        lMP_DayAhead.SyncId = syncId;
        return lMP_DayAhead;
    }

How do I get it done with all those namespaces?

  • 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-20T08:58:15+00:00Added an answer on May 20, 2026 at 8:58 am

    Your going to want to look into the System.Xml.Serialization namespace.

    LMP_DayAhead dayAhead = GetDayAheadData();
    var serializer = new XmlSerializer(dayAhead.GetType());
    using (var writer = XmlWriter.Create("dayahead.xml"))
    {
        serializer.Serialize(writer, shoppingCart);
    }
    

    in terms of the namespaces your poco’s will have to mimic the inheritance found in the xml, and i believe there is a way of telling the serializer to ignore the namespaces (can’t remember off the top of my head)

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

Sidebar

Related Questions

Okay guys, I have been scratching my head like mad over this issue and
Okay, this is just a minor caveat. I am currently working with the lovely
Okay, before you guys go nuts -- this is just a small site, temporary
Okay, this is probably a very basic question; but, I'm just getting back in
Okay so to make a long story short I am using this script in
Okay I'm in way over my head as AJAX is definitely a weak area.
Just moved this Joomla 1.6 install over from iPower to Network Solutions. Moved a
Okay, this question is just getting more and more complex, so I'm going to
Okay, I tested this on an empty program, and just having a while(true){} running
okay, this is probably really simple, but i looked all over the site about

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.