I want to be able to pass a "wardTitle" variable to the XML from this page and be able to save just the resulting details as json.
The following returns a XML file of all our councillors and their details. I want to be able to filter on the passed "wardTitle" and only then return the details associated with the councillors who come under that wardtitle
For example If I pass "Cheriton Ward" only the node <wardtitle>Cheriton Ward</wardtitle> would be returned with all it's children so thats the <councillors node> and 3 <councillor> nodes with their associated content
I have tried using xpath but It then seems really cumbersome to iterate through every single node rather than just be able to grab that and convert it to json
I hope that makes sense, if not please shout :(