LZhang
16 years agoFrequent Contributor
How to dynamically select a node from xml response
Hi:
I have a following response:
fba589f7-fe27-471b-94fa-caf1a69532c4
true
Notif92116434243@fakeabchost.net
HTMLEmail
2008-10-21T23:43:11Z
fa94ec92-dff4-4e75-a73e-d4e2f05ea417
true
3164316118
PlainTextSMS
2008-10-21T23:43:18Z
Every time when the response is returned, the order of the two NotificationTarget nodes changes. For example, I have a property transfer to obtain DeliveryFormat from node 1, which is HTMLEmail to another request. The next time when I run the same steps, node 1 can become node 2, which is PlainTextSMS and it gets transferred to subsequent request and then my test case would fail. Is there a way to dynamically transfer the xml node based on specified string? For example, search the xml response and find me the deliveryformat that is "HTMLEmail"?
Regards,
Li Zhang
I have a following response:
Every time when the response is returned, the order of the two NotificationTarget nodes changes. For example, I have a property transfer to obtain DeliveryFormat from node 1, which is HTMLEmail to another request. The next time when I run the same steps, node 1 can become node 2, which is PlainTextSMS and it gets transferred to subsequent request and then my test case would fail. Is there a way to dynamically transfer the xml node based on specified string? For example, search the xml response and find me the deliveryformat that is "HTMLEmail"?
Regards,
Li Zhang