jQuery: get value of child element where other child element matches string

DF-Rambo

New Member
I receive the following when querying a server using REST:\[code\]<?xml version="1.0" encoding="utf-8" standalone="yes"?><widgets> <widget> <wid>wid1007</wid> <path>widgets-1007</path> <name>Frobnutter</name> <id>1</id> <version>0</version> </widget> <widget> <wid>wid1008</wid> <path>widgets-1008</path> <name>Roberts-Coupler</name> <id>2</id> <version>0</version> </widget></widgets>\[/code\]I need to extract the value of "wid" from a "widget" using the known value of "id". What would this look like in jQuery?Thanks!
 
Back
Top