XML : how to write a script in liux which works as service and copy all xml files having specific node t from folder and sub folders to other fiolder

first i have to extract value of M .If it is 7230 then further processing should be made.Then most important parts is enclosed between i have to extract data enclosed in these tags which will be subsequently stored in an oracle table here is my xml

  <?xml version="1.0" encoding="UTF-8"?>  <M NUMBER="7230" >    <D A="2011-09-23T04:29:59.741" B="1" C="2011-09-23T00:00:00.000"  />  <G1>  <R>  <S1><D A="Region_1" />  <G1>  <R>  <S1><D A="Dept1 " />  <G1>  <R><D A="8" B="61" C="1" /></R></G1>  </S1></R>  <R>  <S1><D A="Dept2 " />  <G1>  <R><D A="8" B="61" C="1" /></R></G1>  </S1></R>  <R>  <S1><D A="Dept3 " />  <G1>  <R><D A="8" B="61" C="1" /></R></G1>  </S1></R>  <R>  <S1><D A="Dept4" />  <G1>  <R><D A="8" B="61" C="1" /></R></G1>  </S1></R>  <R>  <S5>  <G1>  <R><D A="8" B="61" C="4" /></R></G1>  </S5></R></G1>  </S1></R></G1>  </M>    i want   a) i have to search for this .xml file out of 2k files, the search criteria  is ID=7230  b) i want to extract data between <S5> tag  currently i have crated table in oracle and can query it but not able to query desired data, ie id=7230 and S5,I want a PL SQL solution as folder is placed on a Linuix machine  thanks a lot.    

No comments:

Post a Comment