how to replace the . in my xml string or varchar2 string
527733Dec 10 2009 — edited Dec 10 2009Hi All,
I need to replace the "." in my code with an "_" , here is my code
set serveroutput on
declare
payloadXml long;
xdoc xmltype;
begin
payloadXml := '<?xml version="1.0"?><CHAT.OBJMESSAGE_TYP><FROM_USERID>abcdabcd</FROM_USERID><TO_USERID>asdfghjk</TO_USERID><MESSAGE>HI THIS IS SOME MESSAGE</MESSAGE></CHAT.OBJMESSAGE_TYP>';
xdoc := new xmltype(payloadXml);
dbms_output.put_line(xdoc.extract('/CHAT_OBJMESSAGE_TYP/MESSAGE/text()').getStringVal());
end;
/
Now in this line I have <CHAT.OBJMESSAGE_TYP> , this i need to change it to
<CHAT_OBJMESSAGE_TYP> and </CHAT_OBJMESSAGE_TYP>
This I have to do it in code.
any suggestions on how to do that ..
TIA