XML Output help [message #352245] |
Mon, 06 October 2008 18:19 |
Anthrax
Messages: 8 Registered: June 2006
|
Junior Member |
|
|
Hi
i have now got my database to output relational data as XML using this procedure.
CREATE OR REPLACE PROCEDURE xml_resources (file_dir varchar2,file_name varchar2) IS
BEGIN
DECLARE
queryCtx DBMS_XMLquery.ctxType;
result CLOB;
BEGIN
queryCtx := DBMS_XMLQuery.newContext('select * from RESOURCES ORDER BY R_ID');
result := DBMS_XMLQuery.getXML(queryCtx);
DBMS_XMLQuery.closeContext(queryCtx);
--call another procedure to write the clob into a file in batches
clob_to_file(file_dir,file_name||'.xml',result);
END;
END xml_resources;
and that gets sent to the clob_to_file procedure to be written to hard disk in .xml format.
the problem i have now is that i need to style it with XSLT but i need to some how put the link to the stylesheet at the top of the xml document.
is there any way to do this?
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="xml.xsl"?>
oracle just puts the first one in and not the second line
[Updated on: Mon, 06 October 2008 18:21] Report message to a moderator
|
|
|
|
|
Re: XML Output help [message #352462 is a reply to message #352245] |
Tue, 07 October 2008 18:38 |
Anthrax
Messages: 8 Registered: June 2006
|
Junior Member |
|
|
hi there again.
is it possible to get oracle to output an Encoding Standard?
like <?xml version="1.0" encoding="ISO-8859-1"?>
at the moment my database is only putting the version at the top of the page and its causing some encoding issues when displaying the content.
mine looks like <?xml version="1.0"?>
i looked around for something like DBMS_XMLQuery.setEncoding() but couldnt find anything that resembled that.
Thanks
|
|
|
|
|