[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: OFF Subject...
Subject: Re: OFF Subject...
From: "michel geadah" <m_ace_g@xxxxxxxxxxx>
Date: Tue, 12 Aug 2003 09:46:09 +0000
|
hi,
I am not using Java..i am using PL/SQL...
I want to get the output file on another computer in the network...
This is one program:
declare
xmlString CLOB := null;
amount integer:= 1000;
position integer := 1;
charString varchar2(1000);
fileHandle UTL_FILE.FILE_TYPE;
begin
xmlgen.setRowsetTag('status');
xmlgen.setRowTag('mappings');
fileHandle := utl_file.fopen('E:\oracle\ora81\bin','XML_For_status.XML',
'w');
xmlgen.setErrorTag('ERROR_RESULT');
xmlgen.setRowIdAttrName('Record');
xmlgen.useNullAttributeIndicator(false);
xmlgen.setStyleSheet('XSL_FOR_Bonus.XSL');
xmlString := xmlgen.getXML('select * from Scott.status',0);
dbms_lob.open(xmlString,DBMS_LOB.LOB_READONLY);
loop
-- read the lob data
dbms_lob.read(xmlString,amount,position,charString);
utl_file.put_line(fileHandle, charString);
position := position + amount;
end loop;
exception
when no_data_found then
-- end of fetch, free the lob
DBMS_OUTPUT.PUT_LINE('no_data_found');
dbms_lob.close(xmlString);
dbms_lob.freetemporary(xmlString);
xmlgen.resetOptions;
utl_file.fclose(fileHandle);
WHEN UTL_FILE.WRITE_ERROR THEN
DBMS_OUTPUT.PUT_LINE('UTL_FILE.WRITE_ERROR');
WHEN UTL_FILE.INVALID_PATH THEN
DBMS_OUTPUT.PUT_LINE('UTL_FILE.INVALID_PATH');
when others then
xmlgen.resetOptions;
DBMS_OUTPUT.PUT_LINE('other stuff');
end;
/
Thanks...
From: Mukul Gandhi <mukulw3@xxxxxxxxx>
i guess you are using Oracle's XSU Java APIs. On
Oracle's site, the following example is given --
import java.sql.*;
import oracle.xml.sql.query.*;
import oracle.jdbc.driver.*;
public class sample
{
public static void main(String args[]) throws
Exception
{
DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection("jdbc:oracle:oci8:scott/tiger@");
OracleXMLQuery qry = new OracleXMLQuery(conn,
"select * from emp");
System.out.println(qry.getXMLString());
conn.close();
}
}
i guess it won't be difficult to serialize the XML
string qry.getXMLString() to a file *in the desired
path*.
You may post your program(or its fragment), so that we
can suggest exactly whats required.
Regards,
Mukul
--- michel geadah <m_ace_g@xxxxxxxxxxx> wrote:
> hi,
> I am using oracle 8.1.7 database on windows2000
> server and i have installed
> XSU in order to transform data from tables into XML
> documents.
> When i transform the table into XML i get the XML
> output file in the
> directory where the oracle is found
> (E:/oracle/ora81/bin).
>
> Does anyone know how to change the file Path of the
> output?That is, i want
> to get the output XML file in the directory that i
> assign...
>
> Thanks...
> Micheal
>
>
_________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months
> FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> XSL-List info and archive:
> http://www.mulberrytech.com/xsl/xsl-list
>
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
- OFF Subject...
- michel geadah - Tue, 12 Aug 2003 04:00:41 -0400 (EDT)
- <Possible follow-ups>
- michel geadah - Tue, 12 Aug 2003 05:46:48 -0400 (EDT) <=
- michel geadah - Tue, 12 Aug 2003 08:00:30 -0400 (EDT)
|
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|