我正在尝试使用C#在XML文档中用≥
替换字符串<Symbol>
<EA_Qualitative type="num" attributeId="Symbol2">
<Items>
<Item>>=</Item>
</Items>
</EA_Qualitative>
</Symbol>
。我需要从大型XML文档中选择一个特定节点。我怎么能在代码中做到这一点?
以下是XML示例:
string cvalue = csDoc.InnerXml.ToString(); //csDoc is the Xml document
stringc cvchild = csDoc.ChildNodes.ToString();
cvchild = csDoc.SelectSingleNode("<Symbol>").InnerText.Replace(">=","&GE;");
message.appendLine("<Item>" + cvchild + "<Item>");
C#代码:
<dependency>
<groupId>yourgroupid</groupId>
<artifactId>projectA</artifactId>
<version>${project.version}</version>
</dependency>