OK I'm a little noob ... but not that noob. :)
I want to do find () in jQuery, which has a similar dot notation or "& &" result. Here is an example (which does not work):
data.find("continent_country[id = 'us'].state[id = 'in']").each(function(){
or
data.find("continent_country[id = 'us'] && state[id = 'in']").each(function(){
I was told to try a comma, for example:
data.find("continent_country[id = 'us'], state[id = 'in']").each(function(){
... but this returns the wrong elements.
My XML looks like this:
<continent_country id="us" name="US"> <state id="al" name="Alabama"> <city url="" name="auburn"/> <city url="" name="birmingham"/> <city url="" name="dothan"/> <city url="" name="florence / muscle shoals"/> <city url="" name="gadsden-anniston"/> <city url="" name="huntsville / decatur"/> <city url="" name="mobile"/> <city url="" name="montgomery"/> <city url="" name="tuscaloosa"/> </state> <state>//more states</states> </continent_country> </continent_country id="eu" name="Europe"> <state>//more states</states> </continent_country>
Some states / provinces / countries use the same identifier, so I would like to find the state in a certain continent.
Thanks in advance...
TSNev source share