我需要得到
- “输入用户名”、“输入密码”
- “stack@gmail.com”/“abcd*”
在单独的列表中
<steps id="0" last="3">
<step id="1" type="ValidateStep">
<parameterizedString><text>Enter User Name</text></parameterizedString>
<parameterizedString><text>stack@gmail.com</text></parameterizedString>
<description>
</description>
</step>
<step id="2" type="ValidateStep">
<parameterizedString><text>EnterPassword</text> </parameterizedString>
<parameterizedString><text>abcd*</text></parameterizedString>
<description></description></step>
<step id="3" type="ActionStep">
<parameterizedString>
<text>Click on Login Button</text>
</parameterizedString><parameterizedString />
<description />
</step>
</steps>
XDocument doc = XDocument.Parse(xmlSteps);
var values = (from f in doc.Elements().Descendants()
select f.Attribute("text").Value).ToArray();