我创建了一个包含 {contentname} 之类的词的模板 xml 文件。我需要用我的值替换这样的标签。请告诉我如何在 vb.net 中搜索这样的单词并使用文件处理替换我的 xml 模板文件是这样的:
<!-- BEGIN: main -->
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05OTA_HotelSearchRQ.xsd" EchoToken="{EchoToken}" Target="{Target}" Version="1.006" PrimaryLangID="{PrimaryLangId}" MaxResponses="{MaxResponses}">
<POS>
<!-- BEGIN:Source -->
<Source>
<RequestorID ID="{affiliateId}" MessagePassword="{MessagePassword}" />
</Source>
<!-- END:Source -->
</POS>
<Criteria <!-- BEGIN:AvailableOnlyIndicator -->AvailableOnlyIndicator=" {AvailableOnlyIndicator}"<!-- END:AvailableOnlyIndicator -->>
<Criterion>