我需要在循环中处理此处显示的字符串。该字符串将是任何标准标记。 为如:C#字符串操作来查找在两个指定字符串中出现的所有字符串
<?xml version="1.0" encoding="utf-8"?>
<article>
<blog>
<title> this is a title </title>
<firstname>Karan</firstname>
<lastname>Johar</lastname>
</blog>
<blog>
<title> this is a title </title>
<firstname>Karan</firstname>
<lastname>Johar</lastname>
</blog>
<blog>
<title> this is a title </title>
<firstname>Karan</firstname>
<lastname>Johar</lastname>
</blog>
</article>
我需要做的是让内容的每次出现<title> ...</title>
之间,然后依次将它们传递到另一个函数,当他们来了。
任何人都可以请指导?
你知道的XPath? http://en.wikipedia.org/wiki/XPath – BlackBear 2014-09-12 11:02:20
可能的重复[如何在C#中使用Xpath读取XML](http://stackoverflow.com/questions/9511608/how-to-read-xml-in- c-sharp-using-xpath) – BlackBear 2014-09-12 11:03:28
没有XPath无法使用......因为这不是真的保证是一个有效的XML标记......字符串操作是唯一的途径。 – 2014-09-12 11:04:22