[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
declare
begin
fileHandle := utl_file.fopen('E:\oracle\ora81\bin','XML_For_status.XML', 'w');
Thanks...
_________________________________________________________________
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
Re: [xsl] OFF Subject...
Subject: Re: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] OFF Subject..., Mukul Gandhi | Thread | Re: [xsl] OFF Subject..., Mukul Gandhi |
Re: [xsl] OFF Subject..., Mukul Gandhi | Date | Re: [xsl] OFF Subject..., Mukul Gandhi |
Month |
Keywords