I am using this to generating the XML from PLSQLAP_Server_API.Post_Outbound_BizAPI
DBMS_LOB.createtemporary(xml_, TRUE);
Xml_Text_Writer_API.Init_Write_Buffer;
Xml_Record_Writer_SYS.Start_Element(xml_, 'Documents',
'xmlns', 'axxos.com/AXIOrderV4',
'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation','axxos.com/AXIOrderV4 file:///Z:/10_PDT_DownTime/Import%20Export/AXI%20std%20Import/AXIOrderStandardV4.71.xsd');
-- Xml_Record_Writer_SYS.Add_Element(xml_,'UniqueId',sys_GUID(),NULL,NULL);
--Xml_Record_Writer_SYS.Add_Element(xml_,'',' >?xml version=''"1.0"' ,NULL,NULL);
-- Xml_Record_Writer_SYS.Add_Element(xml_,'SchemaVersion',4.71,NULL,NULL);
-- Xml_Record_Writer_SYS.Start_Element(xml_,NULL,'xmlns','<?xml version="1.0" encoding="UTF-8"?>',NULL,NULL,NULL,NULL);
Xml_Record_Writer_SYS.Add_Element(xml_,'UniqueId','||>?xml version="1.0" encoding="UTF-8" ?<',NULL,NULL);
--
--dbms_xmldom.setVersion(xml_, '1.0" encoding="UTF-8');
--dbms_xmldom.setCharset(xml_,'UTF-8');
Xml_Record_Writer_SYS.Start_Element(xml_, 'Document');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','DOCUMENT_NO', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',rec_.doc_no , NULL, NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','TITRE_DOCUMENT', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',DOC_TITLE_API.Get_Title(rec_.doc_class,rec_.doc_no), NULL, NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','PROJET_CODE', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',rec_.project_id, NULL, NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','SOUS_PROJET_CODE', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',rec_.sub_project_id , NULL, NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','ACTIVITE_CODE', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',rec_.activity_no , NULL, NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','EVENEMENT_CODE', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',code_evt_ , NULL, NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','EVENEMENT_LIBELLE', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',C_Ref_Evt_API.Get_Lib_Evt(code_evt_) , NULL, NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','TACHE_CODE', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',task_no_ , NULL, NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','UTILISATEUR', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',Person_Info_API.Get_Name_For_User(rec_.user_created), NULL, NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE', 'DATE_DEPOT', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR' ,rec_.dt_cre,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','REGION',NULL,NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',rig_,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','COMMUNE',NULL,NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',libcom_,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','IMMEUBLE_CODE', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',libcom_,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','IMMEUBLE_ADRESSE',NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',bulling_code_,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','IMMEUBLE_ENSEIGNE', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',proj_sign_,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_,'CLE', 'CLE_SITE', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',site_,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_,'CLE', 'OWNER', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR' ,customer_id_,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_,'CLE', 'DATE_TACHE', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',date_effective_,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_,'CLE', 'FICHIER_NOM', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',file_name_,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_, 'CLE','PDV', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR' ,pos_no_,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_,'CLE', 'DATE_TRAITEMENT', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',TO_CHAR(sysdate,'DD-MM-YYYY'),NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_,'CLE', 'DATE_EXPORT', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',TRUNC(sysdate),NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_,'CLE', 'ERROR', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR','',NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Start_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.Add_Element(xml_,'CLE', 'DOCUMENT_REVISION', NULL, NULL);
Xml_Record_Writer_SYS.Add_Element(xml_, 'VALEUR',rec_.doc_rev ,NULL,NULL);
Xml_Record_Writer_SYS.End_Element(xml_, 'METADONNEE');
Xml_Record_Writer_SYS.End_Element(xml_, 'Document');
Xml_Record_Writer_SYS.End_Element(xml_, 'Documents');
Xml_Text_Writer_API.Write_End_Document(xml_); --IF(rec_.doc_no IS NOT NULL) THEN
PLSQLAP_Server_API.Post_Outbound_BizAPI (
bizapi_name_ => 'C_SEND_DOCMENT',
xml_ => xml_,
sender_ => file_name_,
receiver_ => '',
message_type_ => 'EVENT_BIZAPI');