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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:25:23+00:00 2026-06-05T17:25:23+00:00

Hi I can’t understand this error I want read this XML file: <?xml version=1.0

  • 0

Hi I can’t understand this error

I want read this XML file:

<?xml version="1.0" encoding="utf-8"?>
<XnaContent>
  <Asset Type="ReadXML.Nod[]">
    <Item>
      <coneccion>
        <Item>
          <price>53.6003723</price>
          <startNode>
            <coneccion />
            <position>347 0 228</position>
          </startNode>
          <endNode>
            <coneccion />
            <position>334 0 176</position>
          </endNode>
        </Item>
      </coneccion>
      <position>347 0 228</position>
    </Item>
    <Item>
      <coneccion>
        <Item>
          <price>54.74486</price>
          <startNode>
            <coneccion />
            <position>334 0 176</position>
          </startNode>
          <endNode>
            <coneccion />
            <position>280 0 167</position>
          </endNode>
        </Item>
        <Item>
          <price>53.6003723</price>
          <startNode>
            <coneccion />
            <position>334 0 176</position>
          </startNode>
          <endNode>
            <coneccion />
            <position>347 0 228</position>
          </endNode>
        </Item>
      </coneccion>
      <position>334 0 176</position>
    </Item>
  </Asset>
</XnaContent>

I have this class for read that:

public class Nod
{
    public List<Coneccion> coneccion;

    public Vector3 position;

    public Nodo(Vector3 p)
    {
        position = p;
        coneccion = new List<Coneccion>();
    }
}

and

public class Coneccion
{
    public float price;
    public Nodo startNode;
    public Nodo endNode;

    public Coneccion(Nod c, Nod f, float cost)
    {
        startNode = c;
        endNode = f;
        price = cost;
    }
}

These classes simulates a graph.

I have to read these xml file named level.xml and i use these function for read

Nod[] graph1 = Content.Load<Nod[]>("level.xml");

But I run project and print the next error:

Error   1   Building content threw InvalidOperationException: Cannot deserialize type ReadXML.Nod because it does not have a parameterless constructor.
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.ReflectiveSerializer.Deserialize(IntermediateReader input, ContentSerializerAttribute format, Object existingInstance)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.IntermediateReader.ReadRawObjectInternal[T](ContentSerializerAttribute format, ContentTypeSerializer typeSerializer, Object existingInstance)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.IntermediateReader.ReadObjectInternal[T](ContentSerializerAttribute format, ContentTypeSerializer typeSerializer, Object existingInstance)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.CollectionHelper.Deserialize(IntermediateReader input, ContentSerializerAttribute format, Object collection)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.ArraySerializer`1.Deserialize(IntermediateReader input, ContentSerializerAttribute format, T[] existingInstance)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.ContentTypeSerializer`1.Deserialize(IntermediateReader input, ContentSerializerAttribute format, Object existingInstance)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.IntermediateReader.ReadRawObjectInternal[T](ContentSerializerAttribute format, ContentTypeSerializer typeSerializer, Object existingInstance)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.IntermediateReader.ReadObjectInternal[T](ContentSerializerAttribute format, ContentTypeSerializer typeSerializer, Object existingInstance)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.IntermediateReader.ReadObject[T](ContentSerializerAttribute format)
en Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate.IntermediateSerializer.Deserialize[T](XmlReader input, String referenceRelocationPath)
en Microsoft.Xna.Framework.Content.Pipeline.XmlImporter.Import(String filename, ContentImporterContext context)
en Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
en Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
en Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[]& warnings)  C:\Downloads\Bomber-O-Man (Entrega 2)\IAJMovimiento\IAJMovimiento\IAJMovimientoContent\level.xml    IAJMovimiento

Help please

  • 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-05T17:25:24+00:00Added an answer on June 5, 2026 at 5:25 pm

    You need to add this code to your Nod or Nodo class (one of them is spelled wrong).

    public Nodo()
    {
        position = Vector3.Zero;
        coneccion = new List<Coneccion>();
    }
    

    That’s what I can see at first glance, there may be other errors as well.

    Also, from what I understand here, you’ll need to change the position outside of the constructor call in the ContentTypeWriter.

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

Sidebar

Related Questions

Can someone please provide an example of how to store, and read xml data
Can anybody help me? What should be the datatype for this type -07:00:00 of
can someone show me the regex for this preg_match. I want to make sure
Can anybody please tell me why the removeEventListener call is not working? this.addEventListener(Event.ENTER_FRAME, eventCall,
Can someone please explain how Read/Show works.. I cannot find any tutorials on it.
Can anyone tell me why this code would not be working? $('body').on('test', function() {
Can I run this in a Windows command prompt like I can run it
Can someone guide me on a possible solution? I don't want to use /bin/cp
Can you guys help me understand a concept real quick, I'm having trouble understanding
can someone explain why the compiler accepts only this code template<typename L, size_t offset,

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.