Home » SQL & PL/SQL » SQL & PL/SQL » XML encoding to UTF-8 charset - Oracle 9i (9i)
XML encoding to UTF-8 charset - Oracle 9i [message #569555] Mon, 29 October 2012 08:29
gilbert_makinana
Messages: 5
Registered: August 2011
Location: CAPE TOWN
Junior Member

Hi Masters

Database Version : 9i

Can you please help me here.. I am in a process of writing an Inventory Adjustment tool that will generate the XML and encode it to utf-8 charset...
I have successfully written the code to generate the XML in this format
<?xml version="1.0" encoding="ISO-8859-1" ?>
<InvAdjustDesc>
<dc_dest_id>323</dc_dest_id>
<InvAdjustDtl>
<item_id>12345678</item_id>
<adjustment_reason_code>383</adjustment_reason_code>
<unit_qty>4</unit_qty>
<from_disposition>ATS</from_disposition>
<to_disposition/>
<user_id>e7062159</user_id>
<create_date>
<year>2012</year>
<month>10</month>
<day>29</day>
<hour>14</hour>
<minute>59</minute>
<second>25</second>
</create_date>
<ww_liability_code>353</ww_liability_code>
<ww_ref_1/>
<ww_ref_2/>
<ww_tran_id>25863399875</ww_tran_id>
<ww_alloc_no/>
<ww_final_store>353</ww_final_store>
</InvAdjustDtl>
</InvAdjustDesc>

And now as part of the AIT requirement this XML needs to be encoded to utf-8 and look like this

<?xml version="1.0" encoding="UTF-8"?><RibMessages><ribMessage><family>InvAdjust</family><type>INVADJUSTCRE</type><id>54601557</id><ribmessageID >3</ribmessageID><publishTime>2012-10-29 15:03:12.000 SAST</publishTime><messageData><?xml version="1.0" encoding="ISO-8859-1" ?><InvAdjustDesc><dc_dest_id>323</dc_dest_id><InvAdjustDtl><item_id>12345678</item_id><adjustment_reason_code>383</adjustment_reason_code ><unit_qty>4</unit_qty><from_disposition>ATS</from_disposition><to_disposition/><user_id>e7062159</user_id><create_date><year >2012</year><month>10</month><day>29</day><hour>14</hour><minute>59</minute><second>25</second></create_date><ww_liability_code >353</ww_liability_code><ww_ref_1/><ww_ref_2/><ww_tran_id>25863399875</ww_tran_id><ww_alloc_no/><ww_final_store>353</ww_final_store ></InvAdjustDtl></InvAdjustDesc></messageData><customFlag>F</customFlag></ribMessage></RibMessages>

I am not quite familiar with xml encoding do you have any suggestion on how i can accomplish this?
Thanks
Previous Topic: Split Months
Next Topic: T-Sql to Pl/Sql
Goto Forum:
  


Current Time: Sat Sep 20 11:21:09 CDT 2014

Total time taken to generate the page: 0.08595 seconds