开发者

How I can read and excute a big xml file?

开发者 https://www.devze.com 2023-03-11 05:11 出处:网络
my code gives me error : \"\'.\', hexadecimal value 0x00, is an invalid character. Line 2, position 1.\"

my code gives me error : "'.', hexadecimal value 0x00, is an invalid character. Line 2, position 1."

    string FileName = "20110606 100419 ServerForShop 1.xml";
    string root = Server.MapPath("~/Include/Xml Files/Patch/");       

    var custs = from c in XElement.Load(root + FileName).Elements("Update")
           开发者_Go百科 select c;

I want to read and execute command a big xml file it is about 350MB how I can read it ? here is my xml file structure :

<?xml version="1.0" encoding="utf-8"?>
<Update>
  <Object Name="Good">
    <Insert Table="Good">
      <Field Name="GoodCode" Value="1" Type="Integer" />
      <Field Name="GoodUserCode" Value="" Type="String" />
      .
      .
      .
    </Insert>
  </Object>
  </Update>


I would recommend looking here for some samples http://support.microsoft.com/kb/307548 and perhaps here How does one parse XML files?

0

精彩评论

暂无评论...
验证码 换一张
取 消