嗨,我需要在 xml 文件中插入一些行并保存它我应该怎么做?
xml文件是
<?xml version="1.0" encoding="utf-8"?>
<Dashboard CurrencyCulture="en-US">
<Title Text="Dashboard" />
<DataConnections>
<DataConnection Name="Database1Connection" ProviderKey="Access2007" ConnectionString="XpoProvider=MSAccess;Provider=Microsoft.ACE.OLEDB.12.0;Mode=Share Deny None;data source=D:\Sina\Desktop\Omid\Database1.accdb;Jet OLEDB:Database Password=;">
<Parameters>
<Parameter Name="database" Value="D:\Sina\Desktop\Omid\Database1.accdb" />
<Parameter Name="read only" Value="1" />
<Parameter Name="generateConnectionHelper" Value="false" />
</Parameters>
</DataConnection>
</DataConnections>
<DataSources>
<DataSource Name="Data Source 1">
<DataProvider DataConnection="Database1Connection" SupportSql="true" />
</DataSource>
<DataSource Name="Query 2" />
</DataSources>
我需要插入这些行
<Selection>
<Table Name="Query2">
<Columns>
<Column Name="PName" />
<Column Name="Prog" />
<Column Name="RDate" />
</Columns>
</Table>
</Selection>
之间
<DataProvider DataConnection="Database1Connection" SupportSql="true">
.
.(here)
</DataProvider>