xpath - Parse XML structure in .net 2 -


i have following xml fragment

<converters c1="xxx" c2="zzz">     <converter c1="yyy" c2="zzz"                 buy="0.99899070428571424" sell="0.99966215285714288" />     <converter c1="xxx" c2="yyy"                 buy="1.5503238471428571" sell="1.550773867142857" />     <converter c1="xxx" c2="zzz"                 buy="1.5487591119281807" sell="1.5502499426226253" /> </converters> 

i trying retrieve value of number in "buy" attribute converter has c1="xxx" , c2="zzz".

i can't use linq xml unfortunatley or easy (for me). guess stuck using xpath

i've created xpathnavigator can't syntax valu want

anyone, idea how this?

if use xpathdocument can do

foreach (xpathnavigator buy in new xpathdocument("input.xml").createnavigator().select("converters/converter[@c1 = 'xxx' , @c2 = 'zzz']/@buy")) {   console.writeline(buy.value); } 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -