Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Put Header in XML

Martin1Jan 14 2009 — edited Jan 15 2009
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 12 2009
Added on Jan 14 2009
11 comments
2,772 views