Put Header in XML
Martin1Jan 14 2009 — edited Jan 15 2009Hi,
i have a select which i use to create a XML file. How can i now put the header '<?xml version="1.0" encoding="UTF-8"?>' at the beginning of the file?
Here the select:
SELECT
XMLELEMENT
("PRINTORDER",
XMLATTRIBUTES
('EID-AA-FL-ImportScheme.xsd' AS "xsi:noNamespaceSchemaLocation",
'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi"
),
XMLELEMENT("EID",
XMLELEMENT("DATA",
XMLELEMENT("PEID", dat.peid),
XMLELEMENT("Priority", dat.priority),
XMLELEMENT("Name1", dat.name_1),
XMLELEMENT("Name2", dat.name_2),
XMLELEMENT("FirstName1", dat.first_name_1),
XMLELEMENT("DateOfBirth", dat.date_of_birth),
XMLELEMENT("ValidUntil", dat.valid_until),
XMLELEMENT("Foto", dat.foto_enc),
XMLELEMENT("Sign", dat.sign_enc),
XMLELEMENT("Sex", dat.sex),
XMLELEMENT("Height", dat.height),
XMLELEMENT("Nationality", dat.nationality),
XMLELEMENT("PlaceAndDateOfIssue", dat.place_and_date_of_issue)
),
XMLELEMENT("FirstName2", eid.first_name_2)
)
)
INTO vXml
FROM fp_ss_eideaa_data dat
, fp_ss_eideaa_eid eid
WHERE dat.job_id = pJobId
AND eid.ss_id = dat.ss_id;
Many thanks in advance.
Regards,
Martin