S
shil
In my project I have to read XML files I collect from people. Some of
the XML files have weird characters in the date format, due to which I
get an exception on the ReadXml method of the dataset.
I have this code in Framework 2.0.
Dim objDSXML As New DataSet
objDSXML.ReadXml("\Config.xml")
I get System.Xml.XmlException {"Invalid character in the given
encoding. Line 13, position 27."}
My Config.xml files looks like this.
<?xml version="1.0" ?>
<configuration>
<Node1>0</Node1>
<LN></LN>
<pd>12345</pd>
<Number>13842</Number>
<Type>5000</Type>
<ID></ID>
<pass></pass>
<phoneNo></phoneNo>
<status>1</status>
<createdBy>me</createdBy>
<createdDate>2007-04-23 ?�후 6:01:52</createdDate>
<Factors></Factors>
<Name></Name>
</configuration>
It is very rare that I get this corrupted date format. But I have to
handle this with code and escape from moving froward if I get a file
like this.
Can any one help me with this?
the XML files have weird characters in the date format, due to which I
get an exception on the ReadXml method of the dataset.
I have this code in Framework 2.0.
Dim objDSXML As New DataSet
objDSXML.ReadXml("\Config.xml")
I get System.Xml.XmlException {"Invalid character in the given
encoding. Line 13, position 27."}
My Config.xml files looks like this.
<?xml version="1.0" ?>
<configuration>
<Node1>0</Node1>
<LN></LN>
<pd>12345</pd>
<Number>13842</Number>
<Type>5000</Type>
<ID></ID>
<pass></pass>
<phoneNo></phoneNo>
<status>1</status>
<createdBy>me</createdBy>
<createdDate>2007-04-23 ?�후 6:01:52</createdDate>
<Factors></Factors>
<Name></Name>
</configuration>
It is very rare that I get this corrupted date format. But I have to
handle this with code and escape from moving froward if I get a file
like this.
Can any one help me with this?