xml操作-帮个忙吧,各位大虾!
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{606D02C8-493F-4721-B714-0EC1A040A3EC}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Ctrip.Business.FlightBusiness</RootNamespace>
<AssemblyName>Ctrip.Business.FlightBusiness</AssemblyName>
<SccProjectName>"%24/CtripSolution/BusinessLayer/FlightFactory", PAAAAAAA</SccProjectName>
<SccLocalPath>.</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>MSSCCI:Microsoft Visual SourceSafe</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
把里面所有的Reference节点去掉,然后加一条
<Reference Include="System.IO" />
应该如何写呀~~~~~ --------------------编程问答-------------------- XmlDocument doc = new XmlDocument();
doc.Load(@"e:\1.xml");
XmlNodes nodes = doc.SelectNodes("//Reference");
XmlNode nodeParent = null;
foreach(XmlNode node in nodes)
{
nodeParent = node.ParentNode;
nodeParent.RemoveChild(node);
}
XmlElement ele = doc.CreateElement("Reference");
ele.Attributes["Include"] = "System.IO";
nodeParent.AppendChild(ele);
doc.Save(@"e:\1.xml"); --------------------编程问答-------------------- 顶ls的。太熟练了 。呵呵
补充:.NET技术 , C#