Dear Sir,
I have created following doc. and the output follows it.
It is as follows:
export to indxmlext.text of del
select
xmlelement(name "macess_exp_inport_export_file",
xmlelement(name "file_header",
xmlelement(name "file_information",
xmlelement(name "file_purpose", 'MEMBER FOLDER'),
xmlelement(name "file_description"),
xmlelement(name "file_source"),
xmlelement(name "file_external_reference"))),
xmlelement(name "items",
xmlelement(name "folders",
xmlelement(name "folder",
xmlelement(name "external_reference"),
xmlelement(name "processing_instructions",
xmlelement(name "mode", 'UPDATE')),
xmlelement(name "filing_instructions",
xmlelement(name "folder_ids",
xmlelement(name "parent_folder", xmlattributes(n.mbrhs_sub_ssn as "id",
'19' as "folder_type_id")))),
xmlelement(name "folder_data",
xmlelement(name "folder_header",
xmlelement(name "folder_type", xmlattributes('20' as "id")),
xmlelement(name "folder_id", n.mbrhs_sub_ssn ||''|| n.mbrhs_ins_rel ||''|| n.mbrhs_cso_fname),
xmlelement(name "folder_name", n.mbrhs_cso_lname ||';'|| n.mbrhs_cso_fname),
xmlelement(name "folder_properties",
xmlelement(name "folder_property", xmlattributes('7' as "folder_property_definition_id",
'update' as "action"),
substr(char(n.mbrhs_cso_dob), 6,2) || substr(char(n.mbrhs_cso_dob), 9,2) ||
substr(char(n.mbrhs_cso_dob), 1,4)
),
xmlelement(name "folder_property", xmlattributes('8' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_cad_zip),
xmlelement(name "folder_property", xmlattributes('9' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_cso_lname),
xmlelement(name "folder_property", xmlattributes('10' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_cso_fname),
xmlelement(name "folder_property", xmlattributes('11' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_ins_rel),
xmlelement(name "folder_property", xmlattributes('12' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_cso_sex),
xmlelement(name "folder_property", xmlattributes('31' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_cad_addr1),
xmlelement(name "folder_property", xmlattributes('32' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_cad_addr2),
xmlelement(name "folder_property", xmlattributes('33' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_cad_city),
xmlelement(name "folder_property", xmlattributes('34' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_cad_st),
xmlelement(name "folder_property", xmlattributes('35' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_sub_hsn),
xmlelement(name "folder_property", xmlattributes('36' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_ine_enr_code),
xmlelement(name "folder_property", xmlattributes('38' as "folder_property_definition_id",
'21' as cat_id, 'update' as "action"),
substr(char(n.mbrhs_med_a_dt), 6,2) || substr(char(n.mbrhs_med_a_dt), 9,2) ||
substr(char(n.mbrhs_med_a_dt), 1,4)),
xmlelement(name "folder_property", xmlattributes('38' as "folder_property_definition_id",
'23' as cat_id, 'update' as "action"),
substr(char(n.mbrhs_med_b_dt), 6,2) || substr(char(n.mbrhs_med_b_dt), 9,2) ||
substr(char(n.mbrhs_med_b_dt), 1,4)),
xmlelement(name "folder_property", xmlattributes('38' as "folder_property_definition_id",
'24' as cat_id, 'update' as "action"),
substr(char(n.mbrhs_med_d_dt), 6,2) || substr(char(n.mbrhs_med_d_dt), 9,2) ||
substr(char(n.mbrhs_med_d_dt), 1,4)),
xmlelement(name "folder_property", xmlattributes('38' as "folder_property_definition_id",
'25' as cat_id, 'update' as "action"),
substr(char(n.mbrhs_oic_dt), 6,2) || substr(char(n.mbrhs_oic_dt), 9,2) ||
substr(char(n.mbrhs_oic_dt), 1,4)),
xmlelement(name "folder_property", xmlattributes('39' as "folder_property_definition_id",
'update' as "action"), n.mbrhs_cid_hicn),
xmlelement(name "folder_property", xmlattributes('42' as "folder_property_definition_id",
'update' as "action"),
substr(char(n.mbrhs_eff_dt), 6,2) || substr(char(n.mbrhs_eff_dt), 9,2) ||
substr(char(n.mbrhs_eff_dt), 1,4)),
xmlelement(name "folder_property", xmlattributes('43' as "folder_property_definition_id",
'update' as "action"),
substr(char(n.mbrhs_curr_termdt), 6,2) || substr(char(n.mbrhs_curr_termdt), 9,2) ||
substr(char(n.mbrhs_curr_termdt), 1,4)
)
)))))))
as "indxmlext"
from hs.NewMembExtract n
;
THE OUTPUT IS AS FOLLOW,WHICH IS NOT CORRECT:
<?xml version="1.0" encoding="UTF-8" ?>
<macess_exp_inport_export_file>
<file_header>
<file_information>
<file_purpose>MEMBER FOLDER</file_purpose>
<file_description/>
<file_source/>
<file_external_reference/>
</file_information>
</file_header>
<items>
<folders>
<folder>
<external_reference/>
<processing_instructions>
<mode>UPDATE</mode>
</processing_instructions>
<filing_instructions>
<folder_ids>
<parent_folder id="524660349" folder_type_id="19"/>
</folder_ids>
</filing_instructions>
<folder_data>
<folder_header>
<folder_type id="20"/>
<folder_id>524660349EELEWIS</folder_id>
<folder_name>PETTY;LEWIS</folder_name>
<folder_properties>
<folder_property folder_property_definition_id="7" action="update">11131947</folder_property>
<folder_property folder_property_definition_id="8" action="update">80530 </folder_property>
<folder_property folder_property_definition_id="9" action="update">PETTY</folder_property>
<folder_property folder_property_definition_id="10" action="update">LEWIS</folder_property>
<folder_property folder_property_definition_id="11" action="update">EE</folder_property>
<folder_property folder_property_definition_id="12" action="update">M</folder_property>
<folder_property folder_property_definition_id="31" action="update">6294 CLAYTON CIR</folder_property>
<folder_property folder_property_definition_id="32" action="update"/>
<folder_property folder_property_definition_id="33" action="update">FREDERICK</folder_property>
<folder_property folder_property_definition_id="34" action="update">CO</folder_property>
<folder_property folder_property_definition_id="35" action="update">W32799509</folder_property>
<folder_property folder_property_definition_id="36" action="update">ACT</folder_property>
<folder_property folder_property_definition_id="38" CAT_ID="21" action="update"/>
<folder_property folder_property_definition_id="38" CAT_ID="23" action="update"/>
<folder_property folder_property_definition_id="38" CAT_ID="24" action="update"/>
<folder_property folder_property_definition_id="38" CAT_ID="25" action="update"/>
<folder_property folder_property_definition_id="39" action="update"/>
<folder_property folder_property_definition_id="42" action="update">01012011</folder_property>
<folder_property folder_property_definition_id="43" action="update"/>
</folder_properties>
</folder_header>
</folder_data>
</folder>
</folders>
</items>
</macess_exp_inport_export_file>
RE: the doc should begin with ?xml, then macess and continue with the fold and /folder, then each folder should continue until all the folders are done. The very last porting should contain; /folder properties, /folder header, /folder data, /folder, /folders, /items, and then /macess...
cOULD ANYONE TELL ME WHAT i AM DOING WRONg?
tHANK yOU
GSP