The XML structure is as follows:
< Frequency Division Division name = "2013_01freqband137_137p025m" display ratio = "0.530348" >
< Business Set >
< Business Primary= "1" owlcode= "Radioserviceextra2_m21" >
< footnote list >
< footnotes >5.55</ footnotes >
< footnotes >5.56</ footnotes >
</ footnote list >
</ Business >
< Business Primary= "1" owlcode= "spaceservice1_m2" >
< footnote list >
< footnotes >5.57</ footnotes >
</ footnote list >
</ Business >
< Business Primary= "1" owlcode= "Spaceservice_o4" >
< footnote list >
< footnotes >5.58</ footnotes >
</ footnote list >
</ Business >
< Business Primary= "1" owlcode= "SPACESERVICE_R3" >
< footnote list >
< footnotes >5.59</ footnotes >
</ footnote list >
</ Business >
< Business Primary= "1" owlcode= "TERRESTRIALSERVICE_GD" >
< footnote list >
< footnotes >5.60</ footnotes >
</ footnote list >
</ Business >
< Business Primary= "1" owlcode= "Terrestrialservice_y2" >
< footnote list >
< footnotes >5.61</ footnotes >
</ footnote list >
</ Business >
</ Business Set >
< footnote list >
< footnotes >5.208</ footnotes >
</ footnote list >
</ Frequency Division >
Query " < Business > "in the Owlcode property and the " < footnote list > ", Query SQL as follows:
Select fa.freq_zone_id, Xt.owlcode owl_code,footnote
from Fs_freq_allocation_cn FA,
xmltable ( '/ " Span style= "font-family: Song body; Background-color:white "> frequency division / business set / business " passing Fa.freq_allocation_xml columns
Owlcode VARCHAR2() path' @owlcode ',
foot_xml xmltypepath' footnote list ') XT,
xmltable ( '/ " Span style= "font-family: Song body; Background-color:white "> footnote list / footnote " passing Xt.foot_xml columns
Footnote varchar2( ) path ' text () ') jz
where fa.is_latest_ver = ' 1 'and freq_zone_id = ' 137-137.025m-2013 ';
The query results are as follows:
1???? 137-137.025m-2013???? RADIOSERVICEEXTRA2_M21???? 5.55
2???? 137-137.025m-2013???? RADIOSERVICEEXTRA2_M21???? 5.56
3???? 137-137.025m-2013???? SPACESERVICE1_M2???? 5.57
4???? 137-137.025m-2013???? Spaceservice_o4???? 5.58
5???? 137-137.025m-2013???? SPACESERVICE_R3???? 5.59
6???? 137-137.025m-2013???? TERRESTRIALSERVICE_GD???? 5.60
7???? 137-137.025m-2013???? Terrestrialservice_y2???? 5.61
Oracle XML Nested query