S
srikantht
hi,
i am trying to open a xml file which is in unicode format utf-16.
the file is
<?xml version="1.0" encoding="UTF-16"?>
<CurrentWeather>
<Location>Bombay / Santacruz, India (VABB) 19-07N 072-51E
14M</Location>
<Time>Mar 10, 2006 - 12:40 AM EST / 2006.03.10 0540 UTC</Time>
<Wind> from the WSW (240 degrees) at 5 MPH (4 KT):0</Wind>
<Visibility> 1 mile(s):0</Visibility>
<SkyConditions> partly cloudy</SkyConditions>
<Temperature> 80 F (27 C)</Temperature>
<DewPoint> 66 F (19 C)</DewPoint>
<RelativeHumidity> 61%</RelativeHumidity>
<Pressure> 29.94 in. Hg (1014 hPa)</Pressure>
<Status>Success</Status>
</CurrentWeather>
i am using following code to lode the file
XmlDocument doc = new XmlDocument();
doc.Load("C:\\mm.xml");
XmlDeclaration decl = (XmlDeclaration) doc.FirstChild;
Console.WriteLine("\n{0}", "XML DECLARTION:");
Console.WriteLine("{0}", "Version " + "= " + decl.Version);
Console.WriteLine("{0}", "Encoding " + "= " + decl.Encoding);
Console.WriteLine("{0}", "Standalone " + "= " + decl.Standalone);
but i am getting problem at line 3
the error is thers is no unicode byte order mark.cannot switch to
unicode
please help me
i am trying to open a xml file which is in unicode format utf-16.
the file is
<?xml version="1.0" encoding="UTF-16"?>
<CurrentWeather>
<Location>Bombay / Santacruz, India (VABB) 19-07N 072-51E
14M</Location>
<Time>Mar 10, 2006 - 12:40 AM EST / 2006.03.10 0540 UTC</Time>
<Wind> from the WSW (240 degrees) at 5 MPH (4 KT):0</Wind>
<Visibility> 1 mile(s):0</Visibility>
<SkyConditions> partly cloudy</SkyConditions>
<Temperature> 80 F (27 C)</Temperature>
<DewPoint> 66 F (19 C)</DewPoint>
<RelativeHumidity> 61%</RelativeHumidity>
<Pressure> 29.94 in. Hg (1014 hPa)</Pressure>
<Status>Success</Status>
</CurrentWeather>
i am using following code to lode the file
XmlDocument doc = new XmlDocument();
doc.Load("C:\\mm.xml");
XmlDeclaration decl = (XmlDeclaration) doc.FirstChild;
Console.WriteLine("\n{0}", "XML DECLARTION:");
Console.WriteLine("{0}", "Version " + "= " + decl.Version);
Console.WriteLine("{0}", "Encoding " + "= " + decl.Encoding);
Console.WriteLine("{0}", "Standalone " + "= " + decl.Standalone);
but i am getting problem at line 3
the error is thers is no unicode byte order mark.cannot switch to
unicode
please help me