我存儲xml結構像xml字符串像abcd variable.test1,test2,test3是xml sructure.how的一部分到獲得像test1,test2,test3的1,2,3後綴值?如何從xml結構中獲取後綴值?
string abcd="<xmlstruct>
<test1>
<name>testname1</name>
<address>testaddress1</address>
<subject>testsub1<subject>
</test1>
<test2>
<name>testname2</name>
<address>testaddress2</address>
<subject>testsub2<subject>
</test2>
<test3>
<name>testname3</name>
<address>testaddress3</address>
<subject>testsub3<subject>
</test3>
</xmlstruct>";
你打算從test1,test2和test3中獲得值「1」,「2」和「3」? –
@CuongLe是的,我需要1,2,3值 –