Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Issues reading XML File UTF-8

$
0
0

Hello, I've been trying to read a xml file that is generated when I build my project, below is the xml

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    </configSections>
    <connectionStrings>
        <add name="Galdim_Control_Center.Properties.Settings.GaldimConnectionString"
            connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=&quot;Z:\Proyectos\Agencia de Viaje .NET\Base de Datos\Nueva\Galdim.accdb&quot;"
            providerName="System.Data.OleDb" />
    </connectionStrings>
</configuration>

When I try to read it using the code mentioned below it pops up an error, the message of the error is in spanish and it says "Los datos del nivel de raiz no son validos, linea 1, posicion 1", in english it would be something like "The data at the root level are invalid,line 1, position 1", what can I do to read  the file, I doing this to change the connection string in runtime.

XmlDocument doc = new XmlDocument();
doc.LoadXml("Galdim Control Center.exe.config");

Regads

Gabriel


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>