我有一个xml文件,其中有两个链接。我需要检查,看看是否存在rel的链接,如果它获得了它的href值。从URL链接获取相对值链接
<a:link rel="prev" type="application/atom+xml" type="application/atom+xml" href="/v3.2/en-us/" />
<a:link rel="next" type="application/atom+xml" type="application/atom+xml" href="/v3.2/en-us/" />
你能举一个你到目前为止的例子吗? – Jake1164
对不起,我得到的最多的是 string test = ReturnedAppsXml.Element(ns +“link”)。Attribute(rel).Value; 返回第一个链接的值。除循环以外,我可以使用正则表达式检查,或者如果第二个链接存在,则使用下一个 – scripter78
的rel值进行检查。这不是有效的Xml,它带有两个类型属性。 –