![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||||
| |||||
|
|
Hello, I have some XML data that looks like this: SAMPLE TEST NAME>T1</NAME DATA>data1</DATA ALLOW>A</ALLOW ALLOW>B</ALLOW /TEST TEST NAME>T2</NAME DATA>data2</DATA DENY>A</DENY DENY>C</DENY /TEST TEST NAME>T3</NAME DATA>data3</DATA /TEST /SAMPLE What Query would I use to select all TEST elements where a) There is no "DENY" of "A". This should select the TEST elements with NAMEs T1 and T3. |
|
b) There is an "ALLOW" of "B". This should select the TEST elements with NAME T1 only. |
|
c) There is no "DENY" of "X". This should select all three TEST elements. |
|
d) There are no "ALLOW" elements at all. (i.e no specific ALLOW means "allow all".) This should select the test elements with NAMEs T2 and T3. |
|
Is there a better way to structure the data? |
#3
| |||
| |||
|
|
The structure of your data looks fine. Hope this gets you started in using XQuery. |
![]() |
| Thread Tools | |
| Display Modes | |
| |