读取字符串并替换为xml节点 [英] read string and replace with xml node
本文介绍了读取字符串并替换为xml节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友们,
我有一个像这样的字符串
亲爱的(FName)(MName)(LName)
您的交易号是(TranNo)
我想每次获得标签(FName)等时都读取上面的字符串,然后将这个标签替换为xml节点参数
所以我的问题是我如何读取上面的字符串并读取标签并用xml参数node替换
在此先感谢
莫哈末Faizan khan
Hi friends,
i have a string like that
Dear (FName) (MName) (LName)
your transaction number is (TranNo)
i want to read above string whenever i will get tag (FName) and etc,then i will replace this tag to xml node parameter
so my issue is that how can i read the above string and read tag and replace with xml parameter node
Thanks in advance
Mohd. Faizan khan
推荐答案
您可以使用replace函数执行以下操作:
you can do something like this by using replace function:
string str = "Dear (FName) (MName) (LName) your transaction number is (TranNo)";
str = str.Replace("(FName)", "NewVAlue");
谢谢
Thanks
这篇关于读取字符串并替换为xml节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文