Skip to content
Advertisement

Parse through SOAP response

I am a beginner at SOAP and have been trying to figure how to parse through XML response when I call the SOAP API.I have already tried similar questions like this on stackoverflow but somehow they are not working for me. I want to access Village and VillageName tag in a loop .

JavaScript

I am using below code to get response from API’

JavaScript

I am able to access 1 value at a time if I use below method

JavaScript

output for above method is :

JavaScript

I need to access Village and VillageName tag in a loop.

Advertisement

Answer

I have accessed the required tags using below method. Plz note i’m using option tag as these will be used as dropdown options

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement