i want to print one of the node value as Author ="" empty string in xml node element as below: This syntax is in oracle:
CREATE OR REPLACE FUNCTION GetRtData
(
pf_wkstn_oid_sh number,
pf_wkstn_oid_lng number
)
RETURN varchar2
IS RtData varchar2(10000);
BEGIN
SELECT REPLACE(XMLElement("TableData",
XMLAGG(XMLElement("rt",XMLAttributes(field_data_type as field_data_type,'' as Author)))
).getStringVal(),'></rt>','/>')
INTO RtData
FROM pmry_c_rt_flng
where wkstn_oid_sh = pf_wkstn_oid_sh
AND wkstn_oid_lng = pf_wkstn_oid_lng;
return RtData;
END;
it is returning as below.
SQL> select GetRtData(100,4223) from dual;
GETRTDATA(100,4223)
----------------------------------------------------------------------------
<TableData><rt FIELD_DATA_TYPE="N"/></TableData>
even Author has removed in oracle while creating the node using as ( '' as
Author) in the above result.
i want the result as below format:
<TableData><rt FIELD_DATA_TYPE="N" Author=""/></TableData>
once i am using as
' ' as Author
<TableData><rt FIELD_DATA_TYPE="N" Author=" "/></TableData> one extra space which is not empty string.
so can any one help me how to handle this one to make as Author = "" only in oracle.