xsl-list
[Top] [All Lists]

Re: OFF Subject...

2003-08-12 03:18:44
You may search for the answer on Oracle's "PL/SQL XML
Programming" forum --
http://www.oracle.com/forums/forum.jsp?forum=157

i am not sure, but changing directory reference on
this statement may do the trick.

fileHandle :=
utl_file.fopen('E:\oracle\ora81\bin','XML_For_status.XML','w');

Regards,
Mukul


--- michel geadah <m_ace_g(_at_)hotmail(_dot_)com> wrote:
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(_at_)yahoo(_dot_)com>

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(_at_)hotmail(_dot_)com> 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



__________________________________
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



<Prev in Thread] Current Thread [Next in Thread>