FUNCTION get_xml_data( p_sql_stmt IN VARCHAR2, p_row_set_tag IN VARCHAR2, p_row_tag IN VARCHAR2 )
RETURN CLOB
IS
l_ctx dbms_xmlgen.ctxHandle;
l_xml CLOB;
BEGIN
l_ctx := dbms_xmlgen.newContext(p_sql_stmt) ;
dbms_xmlgen.setrowsettag(l_ctx, p_row_set_tag );
dbms_xmlgen.setRowTag(l_ctx, p_row_tag );
l_xml := dbms_xmlgen.getXML(l_ctx);
DBMS_XMLGEN.closecontext ( l_ctx ) ;
RETURN l_xml ;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL ;
END get_xml_data
RETURN CLOB
IS
l_ctx dbms_xmlgen.ctxHandle;
l_xml CLOB;
BEGIN
l_ctx := dbms_xmlgen.newContext(p_sql_stmt) ;
dbms_xmlgen.setrowsettag(l_ctx, p_row_set_tag );
dbms_xmlgen.setRowTag(l_ctx, p_row_tag );
l_xml := dbms_xmlgen.getXML(l_ctx);
DBMS_XMLGEN.closecontext ( l_ctx ) ;
RETURN l_xml ;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL ;
END get_xml_data
No comments:
Post a Comment