brokeMyLegBiking
asked on
xpath query that will search for a node with a certain value.
I need to search my xmlDocument for a <loginAction> node such that the value of <username> is equal to a certain value, and <action_name> is equal to a certain value. Here is the routine I need to complete:
Public Shared Function can_do(ByVal action_name As String) As Boolean
If xSecurity.DocumentElement. SelectSing leNode("ne ed an xpath statement here") IsNot Nothing Then
Return True
Else
Return False
End If
End Function
Here is the xmlDocument:
<SecurityDataset>
<loginAction>
<username>mylogin</usernam e>
<action_name>not-run_fundi ng_reports </action_n ame>
</loginAction>
</SecurityDataset>
Public Shared Function can_do(ByVal action_name As String) As Boolean
If xSecurity.DocumentElement.
Return True
Else
Return False
End If
End Function
Here is the xmlDocument:
<SecurityDataset>
<loginAction>
<username>mylogin</usernam
<action_name>not-run_fundi
</loginAction>
</SecurityDataset>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
any qustions just ask :)
ASKER
ok, interesting, didn't know you could use an and statement in xpath, cool.