Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FUNCTION f_vrni_tabelo_postavk(p_xml_node IN XMLTYPE) RETURN row_postavka PIPELINED IS
- out_rec r_postavka;
- l_stevec NUMBER := 1;
- l_xml_vrstica XMLTYPE;
- BEGIN
- LOOP
- l_xml_vrstica := p_xml_node.EXTRACT('/T_POLICA/POSTAVKE/POSTAVKA[' || l_stevec || ']','xmlns="http://www.crea.si/Schemas/2008/AS"');
- EXIT WHEN l_xml_vrstica IS NULL;
- out_rec := NULL;
- out_rec.postavka_id := f_xml(l_xml_vrstica,'/POSTAVKA/POSTAVKA_ID/text()');
- out_rec.sklop := f_xml(l_xml_vrstica,'/POSTAVKA/SKLOP/text()');
- out_rec.tip_postavke := f_xml(l_xml_vrstica,'/POSTAVKA/TIP_POSTAVKE/text()');
- out_rec.paket_id := f_xml(l_xml_vrstica,'/POSTAVKA/PAKET_ID/text()');
- out_rec.izbrano := f_xml(l_xml_vrstica,'/POSTAVKA/IZBRANO/text()');
- out_rec.znesek := f_xml(l_xml_vrstica,'/POSTAVKA/ZNESEK/text()');
- out_rec.odstotek := f_xml(l_xml_vrstica,'/POSTAVKA/ODSTOTEK/text()');
- out_rec.opis := f_xml(l_xml_vrstica,'/POSTAVKA/OPIS/text()');
- out_rec.podtip_postavke := f_xml(l_xml_vrstica,'/POSTAVKA/PODTIP_POSTAVKE/text()');
- pipe ROW(out_rec);
- l_stevec := l_stevec + 1;
- END LOOP;
- RETURN;
- END f_vrni_tabelo_postavk;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement