kamiar3001
kamiar3001

Reputation: 2676

How I can read and excute a big xml file?

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")
            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>

Upvotes: 0

Views: 450

Answers (1)

Bueller
Bueller

Reputation: 2344

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

Upvotes: 1

Related Questions