2959: l_rows_processed NUMBER;
2960: l_xml_header VARCHAR2(32000);
2961: l_xml_header_length NUMBER;
2962: queryCtx DBMS_XMLquery.ctxType;
2963: qryCtx DBMS_XMLGEN.ctxHandle;
2964: l_errNo NUMBER;
2965: l_errMsg VARCHAR2(200);
2966: l_nls_numeric_char VARCHAR2(5);
2967: l_nls_altered BOOLEAN;
3011: END;
3012: /*
3013: RVIRIYAL: Bug#9672615
3014: Starting with 10g DBMS_XMLQUERY package(written java) is deprecated and
3015: it is recommended to use DBMS_XMLGEN package.DBMS_XMLGEN package is similar
3016: to the DBMS_XMLQuery package, except that it is written in C and
3017: compiled into the database kernel.The issue with the DBMS_XMLGEN package is that
3018: it formats the number based on the preferences set.
3019: If the NLS NUMERIC CHARACTERS is set to ",." then the package generates the XML
3013: RVIRIYAL: Bug#9672615
3014: Starting with 10g DBMS_XMLQUERY package(written java) is deprecated and
3015: it is recommended to use DBMS_XMLGEN package.DBMS_XMLGEN package is similar
3016: to the DBMS_XMLQuery package, except that it is written in C and
3017: compiled into the database kernel.The issue with the DBMS_XMLGEN package is that
3018: it formats the number based on the preferences set.
3019: If the NLS NUMERIC CHARACTERS is set to ",." then the package generates the XML
3020: in such away that all the numbers are formatted using the NLS_NUMERIC_CHARACTERS.
3021: Say, if the number is 12840.5(Raw format) and if NLS_NUMERIC_CHARACTERS is set to ",.",
3045: l_nls_altered := TRUE;
3046: l_alter_str:= NULL;
3047: END IF;
3048:
3049: qryCtx := DBMS_XMLGEN.newContext(p_extract_query);
3050: IF PG_DEBUG in ('Y', 'C') THEN
3051: arp_standard.debug( 'Query context set.call to getXML...');
3052: END IF;
3053:
3050: IF PG_DEBUG in ('Y', 'C') THEN
3051: arp_standard.debug( 'Query context set.call to getXML...');
3052: END IF;
3053:
3054: l_result := DBMS_XMLGEN.getXML(qryCtx,DBMS_XMLGEN.NONE);
3055: l_rows_processed := DBMS_XMLGEN.getNumRowsProcessed(qryCtx);
3056: DBMS_XMLGEN.closeContext(qryCtx);
3057: END IF;
3058:
3051: arp_standard.debug( 'Query context set.call to getXML...');
3052: END IF;
3053:
3054: l_result := DBMS_XMLGEN.getXML(qryCtx,DBMS_XMLGEN.NONE);
3055: l_rows_processed := DBMS_XMLGEN.getNumRowsProcessed(qryCtx);
3056: DBMS_XMLGEN.closeContext(qryCtx);
3057: END IF;
3058:
3059: /*If NLS_NUMERIC_CHAR has been modified, restore the same*/
3052: END IF;
3053:
3054: l_result := DBMS_XMLGEN.getXML(qryCtx,DBMS_XMLGEN.NONE);
3055: l_rows_processed := DBMS_XMLGEN.getNumRowsProcessed(qryCtx);
3056: DBMS_XMLGEN.closeContext(qryCtx);
3057: END IF;
3058:
3059: /*If NLS_NUMERIC_CHAR has been modified, restore the same*/
3060: IF l_nls_altered THEN