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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:39:19+00:00 2026-05-25T15:39:19+00:00

I´m trying to load a XML document in Windows CE using C#, however i

  • 0

I´m trying to load a XML document in Windows CE using C#, however i keep getting some strange errors in debugging. Here is my code:

using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace cpap3
{
public class Program
{
    public static void Display()
    {

        XmlDocument docXML = new XmlDocument();

        docXML.Load(Environment.GetFolderPath(Environment.SpecialFolder.Programs)+"\\modulos.xml");


        XmlElement nodRoot = docXML.DocumentElement;

        XmlNodeList nodItems = nodRoot.GetElementsByTagName("Modulos");

        for (int i = 0; i < nodItems.Count; i++)
            Console.WriteLine(nodItems[i].InnerXml);

        for (int i = 0; i < nodItems.Count; i++)
            Console.WriteLine(nodItems[i].InnerXml);

    }

    static int Main(string[] args)
    {

        Display();           

        return 0;
    }
}
}

Am I doing something wrong? The XML file is in the right place, and I’ve tried several locations for the file. This is the error I’m getting.

{“An error message cannot be displayed because an optional resource assembly containing it cannot be found An error message cannot be displayed because an optional resource assembly containing it cannot be found”}

The error occurs when I load the XML file:

docXML.Load(Environment.GetFolderPath(Environment.SpecialFolder.Programs)+”\modulos.xml”);

Here is the exception detail:

System.Xml.XmlException was unhandled
  Message="An error message cannot be displayed because an optional resource assembly   containing it cannot be found An error message cannot be displayed because an optional resource assembly containing it cannot be found"
  LineNumber=1
  LinePosition=31
  SourceUri="file:///Windows/Programs/modulos.xml"
  StackTrace:
at System.Xml.XmlTextReaderImpl.Throw()
at System.Xml.XmlTextReaderImpl.Throw()
at System.Xml.XmlTextReaderImpl.CheckEncoding()
at System.Xml.XmlTextReaderImpl.ParseXmlDeclaration()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load()
at System.Xml.XmlDocument.Load()
at System.Xml.XmlDocument.Load()
at ConsoleApplication3.Program.Display()
at ConsoleApplication3.Program.Main()

—————EDIT————–

It took me a while but now I have real error reports :)… Here is the actual error.

"System does not support 'iso-8859-1' encoding. Line 1, position 31." 

I’ve tried saving my file with different encodings but i keep on getting the same error. Any solutions?

—————EDIT—————–
I’ve solved it 😀 . I was changing the encoding using notepad, but i forgot I had written an encoding tag in the XML file, and that was causing this problem. Stupid mistake. 🙁

  • 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-25T15:39:20+00:00Added an answer on May 25, 2026 at 3:39 pm

    Well, actually you have to talk with the one that built your WinCE OS image to include also the “.Net Compact Framework 3.5 Localized String Resources” by default you will have en-US, but you can select also something else, for example: Portuguese. The option is in Catalog Items View -> Core OS -> Windows Embedded Compact -> Applications and Services Development -> .NET Compact Framework 3.5 -> .Net Compact Framework 3.5 -> .Net Compact Framework 3.5 Localized String Resources

    See attached picture:
    Catalog Item View

    You will have to remake the OS image and also the SDK if you are using one. After this you should no longer have this error.

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

Sidebar

Related Questions

I'm trying to parse and load an XML document, however I'm getting this exception
I am trying to load a xml document I created using PHP and DOM
Trying to load some XML into a document: <Custom AttributeA='' AttributeB='Bob' AttributeC='HUNTERS' COMPANY EMPLOYEES'
I am trying to load a very basic XML document but everytime I get
I'm trying to use the following code # LOAD XML FILE $XML = new
I'm trying to call a function after I load some XML into Actionscript, and
I'm facing a rather strange Issue when trying to load data from an XML-Webservice.
I'm trying to load an XML document which is in Project\Data as shown below:
Im trying to load an xml file using the jquery ajax function,it works fine
I'm trying to load some xml and xslt stuff into this following html file:

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.