I'm trying to parse something that looks like this:
<div>
<h3>Something</h3>
<p>Value I want</p>
</div>
<div>
<h3>Other thing</h3>
<p>Some other value</p>
</div>
I need to get "Value I want". I can't just get the first div because that div is not always there. I need to get the div that has an h3 containing "Something" and then get the parent and then the p under that. I would think the selector would be something like this but it doesn't seem to work.
div h3:contains("Something"):parent p
Doing some other testing, I can't tell that the :parent selector actually does anything so maybe that is part of the problem. Any ideas here?
Thanks...
UPDATE:
Looks like the :parent selector doesn't do what I thought it did. So, question still remains, how would you do this?