Home » Developer & Programmer » JDeveloper, Java & XML » how to GET fld nm= prefix using DBMS_XMLGEN.GETXMLTYPE (11G)
how to GET fld nm= prefix using DBMS_XMLGEN.GETXMLTYPE [message #637262] Wed, 13 May 2015 13:41
Kevin Meade
Messages: 2103
Registered: December 1999
Location: Connecticut USA
Senior Member
using DBMS_XMLGEN.GETXMLTYPE

instead of this:

   <ITEMOUTPUTS>
    <BU_CENTRAL_AGE_ACCUM_IND>0</BU_CENTRAL_AGE_ACCUM_IND>
    <CENTRAL_AGE_ACCUM_IND>0</CENTRAL_AGE_ACCUM_IND>
    <L_BD_GROSS_BENEFIT_NO_SS>0</L_BD_GROSS_BENEFIT_NO_SS>


i want this:

  <ITEMOUTPUTS>
   <FLD NM="BU_CENTRAL_AGE_ACCUM_IND">0</FLD> 
   <FLD NM="CENTRAL_AGE_ACCUM_IND">0</FLD> 
   <FLD NM="L_BD_GROSS_BENEFIT_NO_SS">0</FLD> 


but I don't see any setting to make DBMS_XMLGEN.GETXMLTYPE do this. I am guessing one of four things:

1. there is a function call for the setting I don't see (undocumented?).
2. I have to use a style sheet to dynamically convert the output as it is generated.
3. Like to @ for Attribute style, there is some other character that can be used in TYPE definitions that will tell the xml generated to use this format
4. I can't use dbms_xmlgen.getxmltype but instead need to use the sql functions like XMLELEMENT.


So who knows? Thanks, Kevin.
Previous Topic: WebService Call from Oracle Database using JPublisher
Next Topic: Is it possible to retrieve an array of pl/sql record which contain DATE elements in Java
Goto Forum:
  


Current Time: Sat Aug 08 10:43:14 CDT 2020