Questione : Come estrarre i dati dal xmltype di oracolo

Using questo sql posso estrarre l'un valore dal extractvalue prescelto del xml
(my_xml, “")
from junk_xml2 di //ComponentCommId;  -- rende abc2:: 2AAS-W-018

But non posso calcolare fuori la sintassi per ottenere i dati dai nodi sotto la radice.  Particolarmente se sono l'estratto di repeating.
select (my_xml, “junk_xml di //Status/StatusTypeCommId")
from;  -- il

The dei rendimenti singolo/taglio di double/no è confusionario me e come trattare la ripetizione del ")
from junk_xml2 dell'estratto del
select del
I di nodo (my_xml, “/Status/StatusTypeCommId [=2 del position ()];  -- rende il null


più Latest (Revision), il più in ritardo (approvato) ed efficace (in quella gamma) TagStatus</StatusTypeName>

: Status>

        OsTypeCommId>
        OperationalStatustatusTypeName>
   

A è come estrarre un valore dall'istruzione del sistema che usa un estratto differente del namespace
select (my_xml, “//SystemInstruction/TransactionID„, 'xmlns: rel= " nofollow "„ del _blank„„ del target= " di http://www.constellation.com/CGG/WorkInventoryManagement/CBO/SystemInstruction del href= di = " > ww.constellation.com/CGG/WorkInventoryManagement/CBO/SystemInstruction di http://w„ ') da junk_xml2; -- gli esempi resi del null

Any sarebbero grandi! o un buon posto per trovare examples.
class= > " libero " del
> " del codeSnippet " del class= del
class= " lineNumbers " del
class= del
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
class= " del id= " codeSnippet831868 del
-- tabella/dati del campione
  GENERARE LA TABELLA “EBFCMS„. “JUNK_XML2„ 
   (“MY_COMMENT„ VARCHAR2 (BYTE 4000), 
	“MY_XML„ XMLTYPE
   );


regolar definiscono fuori;

DICHIARARE 
    myclob CLOB;
COMINCIARE
    myclob: = '

    
        Il più Latest (revisione), il più in ritardo (approvato) ed efficace (in quella gamma) 
        TagStatus
    
    
        O
        OperationalStatus
    
    
        
        
    
    
        2
        
    
    
        1
        000
    
    
        
        CONTROL
        
    
    
        
            AAS
            BREATHING AIR
        
        AIR
        AIR
        AAS
        BREATHING AIR
    
    
          relativo alla sicurezza
        
    
    
        Not Applicable
        Safety_Category_abc
    
    
        
        
        
    
    
        
            
                N
                Status
            
            
                Q.00
            
            4385317
            075205029:: abc2-PGCC:: Q.00
            075205029
            LISTA U700 del WIRE
            abc2-PGCC
            
        
    
    
        
            
                N
                Status
            
            
                R.00
            
            4385318
            075205029:: abc2-PGCC:: R.00
            075205029
            LISTA U700 del WIRE
            abc2-PGCC
            
        
    
    
        
            
                N
                Status
            
            
                S.00
            
            4385319
            075205029:: abc2-PGCC:: S.00
            075205029
            LISTA U700 del WIRE
            abc2-PGCC
            
        
    
    
        
            
                N
                Status
            
            
                T.00
            
            4385320
            075205029:: abc2-PGCC:: T.00
            075205029
            LISTA U700 del WIRE
            abc2-PGCC
            
        
    
    
        
            
                N
                Status
            
            
                U.00
            
            4385321
            075205029:: abc2-PGCC:: U.00
            075205029
            LISTA U700 del WIRE
            abc2-PGCC
            
        
    
    
        
            
                N
                Status
            
            
                V.00
            
            4385322
            075205029:: abc2-PGCC:: V.00
            075205029
            LISTA U700 del WIRE
            abc2-PGCC
            
        
    
    
        
            
                N
                Status
            
            
                W.00
            
            4385323
            075205029:: abc2-PGCC:: W.00
            075205029
            LISTA U700 del WIRE
            abc2-PGCC
            
        
    
    
        
            
                N
                Status
            
            
                X.00
            
            4385324
            075205029:: abc2-PGCC:: X.00
            075205029
            LISTA U700 del WIRE
            abc2-PGCC
            
        
    
    
        
            
                N
                Status
            
            
                Y.00
            
            4385325
            075205029:: abc2-PGCC:: Y.00
            075205029
            LISTA U700 del WIRE
            abc2-PGCC
            
        
    
    
        
            
                N
                Status
            
            
                Z.00
            
            4385326
            075205029:: abc2-PGCC:: Z.00
            075205029
            LISTA U700 del WIRE
            abc2-PGCC
            
        
    
    
        
            
                A
                Status
            
            
                07.00
            
            4166665
            07AAS001-002:: abc2-ESK:: 07.00
            07AAS001-002
            ARIA CPRSR AUX del BREATHING
            abc2-ESK
            
        
    
    426269
    abc2:: 2AAS-W-018
    2AAS-W-018
    abc
    
    2
    
    conductors Electrical
    
    Cable
    CABLE
    CABLE 
    
    
    No
    No
    No
    Yes
    No
    
    Indeterminate
    Indeterminate
    No
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Indeterminate
    
    
        
            Indeterminate
        
    
    
        
            248159
            AEBMEL
            
                aeb-146.xxx.corp.net
                80
                HTTP
                aeBWeb/PlugIns/TagManager/Shared/Display.aspx
                t=212& o=426269
            
        
    

';

INSERTO junk_xml2 NEI VALORI (“test1„, XMLTYPE (myclob));
COMMETTERE;

ESTREMITÀ;
class= del

Risposta : Come estrarre i dati dal xmltype di oracolo

Inoltre, se volete andare dopo che lo specific un in un namespace di specific voi può aggiungere un parametro del namespace all'estratto:

selezionare il extractvalue (column_value, “myText del *")
da junk_xml2 J, posporre (xmlsequence (estratto (my_xml, “/ns0: Component/ns0: Condizione/StatusTypeCommId„, “xmlns: ns0= " http://www.mysite.com/WIM/CBO/1.0/Component„ ")))
/




Altre soluzioni  
 
programming4us programming4us