Consider this xml:
<parent>
<child name="alpha" />
</parent>
and also this xml
<parent>
<child name="beta" />
</parent>
There should be only a sinlge node at /parent/child with either alpha or beeta as it's name value.
To clarrify... there will never be 2 child nodes one each named alpha and beta
I'm trying to create a single xpath query which will return the value of name in each of these 2 cases.
I tried this...
/parent/child[@name='alpha' | @name='beta']/@name
...but it does not work.
How should I return this value..?
Update: I ammendedd the samples to ensure they were well formed as one answer indicated they were not.