Well, you *can* select <WORK/> and <HOME/> but they're empty. ExtractValue() gets the *content* of the tag, and empty tags have no content.
Let's look at your example again:
<vCard>
<ADR><WORK/><REGION>Dorset</REGION></ADR>
<ADR><HOME/><REGION>London</REGION></ADR>
</vCard>
Here's a tree representation:
vCard
|
---------------
| |
ADR ADR
| |
------- -------
| | | |
WORK REGION HOME REGION
WORK and REGION are both children of the first ADR element; WORK and REGION are siblings. REGION is not a child of WORK.
Similarly, HOME and REGION are both children of the second ADR element. REGION is not a child of HOME.
Actually, a better XML representation of this information might be:
<vCard>
<ADR><TYPE>work</TYPE><REGION>Dorset</REGION></ADR>
<ADR><TYPE>home</TYPE><REGION>London</REGION></ADR>
</vCard>
or this:
<vCard>
<ADR type="work"><REGION>Dorset</REGION></ADR>
<ADR type="home"><REGION>London</REGION></ADR>
</vCard>
Either of these gives the ADR element consistent structure throughout the XML document, making it heaps easier to work with. :)
Jon Stephens
MySQL Documentation Team @ Oracle
MySQL Dev Zone
MySQL Server Documentation
Oracle