Click here to Skip to main content
16,010,334 members

Comments by anwarntde (Top 2 by date)

anwarntde 15-Mar-11 7:06am View    
Deleted
have an xml file on below,i want to select 1 record from this data by checking two condition, for this i write a query in vb.net like this
Dim nod As XmlNode = xd.SelectSingleNode("/Table/Record[TXN_CODE='" & tbxTxnCode.Text & "']")



it works fine but when i try to add the other condition it throws an erro saying invalid token xpath exception

ERRRO CODE

Dim enodE As XmlNode = xd.SelectSingleNode("/Table/Record[TXN_CODE='MRV'] AND [DOC_NO = 1002]")


i tried almost every combination like
Dim enodE As XmlNode = xd.SelectSingleNode("/Table/Record[TXN_CODE='MRV'] , [DOC_NO = 1002]")
Dim enodE As XmlNode = xd.SelectSingleNode("/Table/Record[TXN_CODE='MRV' AND DOC_NO = 1002]")
Dim enodE As XmlNode = xd.SelectSingleNode("/Table/Record[TXN_CODE='MRV' ,DOC_NO = 1002]")

Anybody have an Idea


<Table>
<record>
<txn_code>MRV
<doc_no>1002
<rownum>764
<serialno>QQQ

<record>
<txn_code>KRV
<doc_no>1003
<rownum>868
<serialno>ASD

</Table>
anwarntde 28-Aug-10 2:39am View    
Reason for my vote of 1
Thnks for ur reply
When I run this query on TOAD it throws an error
That Right paranthesis missing .on the line For xml Path('')