Я пытаюсь проверить, существует ли значение в узле xml, используя Jquery. Строка xml:
<SectionAnswers>
<SectionAnswer>
<detailID>2216</detailID>
<SourceAnswerID>979</SourceAnswerID>
</SectionAnswer>
<SectionAnswer>
<detailID>2218</detailID>
<SourceAnswerID>981</SourceAnswerID>
</SectionAnswer>
<SectionAnswer>
<detailID>2219</detailID>
<SourceAnswerID>977</SourceAnswerID>
</SectionAnswer>
<SectionAnswer>
<detailID>2221</detailID>
<SourceAnswerID>980</SourceAnswerID>
</SectionAnswer>
<SectionAnswer>
<detailID>2282</detailID>
<SourceAnswerID>64</SourceAnswerID>
</SectionAnswer>
<SectionAnswer>
<detailID>2283</detailID>
<SourceAnswerID>978</SourceAnswerID>
</SectionAnswer>
<SectionAnswer>
<detailID>2596</detailID>
<SourceAnswerID>73</SourceAnswerID>
</SectionAnswer>
</SectionAnswers>
Когда я пытаюсь запросить его для значения, используя следующее:
$ ("SectionAnswers", Section) .find ("64") // Раздел - это контекст jquery
Я получаю следующий ответ:
Выражение не возвращает узел DOM.
// -.> 64 <- </p>
Есть идеи, где я ошибаюсь? Я действительно не хочу проходить через них, проверяя значение каждый раз, как в $ ("SectionAnswers", Section) .each ()
Спасибо