Saving xmldom.DOMDocument to a file

Hi all!
I have a problen saving an XML file generated from a SQL sentence in my Oracle 9i Database when the file is higer than 32K bytes.
To save file i use UTL_FILE library and i have found that there is the problem.
The code i use is the following:
CREATE OR REPLACE PROCEDURE SIGADMIN.PRUEBA_CAUC0004_EXT AUTHID CURRENT_USER IS
xml clob;
vxml varchar2(100);
xfile utl_file.file_type;
doc xmldom.DOMDocument;
BEGIN
--Inicializamos el CLOB
DBMS_LOB.CreateTemporary(xml,TRUE);
--Pasar el DOM document a CLOB
xmldom.writeToClob(doc,xml);
xfile := utl_file.fopen('TEMP_DIR','PRUEBA_CAUC0004.xml','w');
WHILE (pos < len) LOOP
vxml := dbms_lob.substr(xml,100,pos);
utl_file.put(xfile,vxml);
pos := pos+100;
END LOOP
--Liberamos los recursos
xmldom.freeDocument(doc);
utl_file.fclose(xfile);
..

What about
clear screen
connect bfile/bfile
set termout on
set feed on
set lines 40
set long 10000000
set serveroutput on
set echo on
clear screen
-- Using dbms_xslprocessor.clob2file
drop directory STORE;
CREATE directory store AS 'C:\TEMP';
declare
rc sys_refcursor;
BEGIN
   open rc FOR
     SELECT * FROM
     ( SELECT rownum FROM dual connect BY level < 25 );
dbms_xslprocessor.clob2file( xmltype( rc ).getclobval( ) , 'STORE','anton.xml');
END;
SELECT extract((XMLTYPE(bfilename('XMLSTORE','anton.xml'),NLS_CHARSET_ID('AL32UTF8'))),'*') AS "XML"
from   dual;
pause
clear screen
-- Using DBMS_XMLDOM.WRITETOFILE
declare
     rc sys_refcursor;
     doc DBMS_XMLDOM.DOMDocument;
begin
   open rc for
      select * from
        ( select rownum from dual connect by level < 25 );
      doc := DBMS_XMLDOM.NewDOMDocument(xmltype( rc ));
      DBMS_XMLDOM.WRITETOFILE(doc, 'STORE/marco.xml');
end;
SELECT extract((XMLTYPE(bfilename('XMLSTORE','marco.xml'),NLS_CHARSET_ID('AL32UTF8'))),'*') AS "XML"
from   dual;

Similar Messages

  • I saved my Form Central spreadsheet file once as a excel file but it will not allow me to save it a second time as an excel file.  It says that I cannot complete this action because the file me be open in another application, but it is not open in another

    I saved my Form Central spreadsheet file once as a excel file but Forms Central will not allow me to save the file a second time as an excel file.  I am informed that I cannot complete this action because the file me be open in another application, but it is not open in another application. What is the problem, and how do I solve the problem.  Thank you. Jeff

    First check the version of the document with Jongware's script "Identify.jsx" (ExtendScript/JavaScript).
    You can find it here:
    [Ann] Identify Your InDesign File
    If it is CS 5.5 or above, you need someone to open it in the version the script says and export an IDML representation from that. Another way would be to install a 30days version of CS6 or above (CC) and do it yourself.
    In regards of the script showing a result for InDesign files higher than CS6:
    CS7 = CC v9
    CS8 = CC v10 = CC-2014 or CC2014.1
    Uwe

  • I received pictures in a dozen emails and saved each picture into one file in .pages.  I did not import the photos before doing this and now iPhoto won't recognize the pictures because they are in a .pages file.  How do I get the pics to iPhoto?

    I received a dozen pictures in a few emails and I saved them all into one file in pages.  I just copied and pasted.  I do not have the originals any longer.  Iphoto will not permit me to import the pictures as it does not recognize a .pages file, nor can I simply click and drag from the pages document to iphoto nor from pages to the desktop to iphoto.  How can I save each picture I guess back into a jpeg and then import them into iphoto or have i lost them to a pages document forever?  This is urgent as I need the pictures made into a book on iphoto for work by Friday!!!  Please advise!  Thank you.

    Greetings,
    Locate the Pages document wherever it's located on your computer and click once on it to highlight it.
    Go to File > Duplicate to make a backup copy of the file.
    Click once again on the file to highlight it.
    Go to File >  Get Info
    In the "Name & Extension" category remove the ".pages" extension and put in ".zip".
    Close the info window and double-click the now renamed pages file (zip file now).It will decompress into a folder which contains all the base components including all the images you added.  These can be dragged onto the iPhoto icon to import them.
    Hope that helps.

  • While using a drop-down menu i.e. File, edit, image, or even when saving as and choosing the file type; the list appears and I am able to highlight what i want but cannot click on anything.

    While using a drop-down menu i.e. File, edit, image, or even when saving as and choosing the file type; the list appears and I am able to highlight what i want but cannot click on anything. This is becoming incredibly frustrating. It happens at random time and a restart of the computer is all that helps, then with out any notice it starts to do this again.  Mac Book Pro i7 2.2 16 GB 1333 Ram, (2) 450GB SSD both internal to machine. At this point I am losing file because I am unable to save in the file type I need. Does anyone out there know how to solve this issue?
    Thanks
    phil

    I haven't been unify photoshop much in the past month, but I did try your suggestion and it seemed to work for a while. Today when i went to save a document the same thing happened: click on file>save at this point I can not click on save even though it is highlighted. Tryed to use command s that brings up the save dialogue box, but when I try to change file type I again cannot select it from the drop down menu.

  • I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is j

    I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is just a plain photoshop file, a watermark is added, then save as jpeg - the jpeg is saved to a different folder than the original photoshop file.)  It happens for about 10 of 30/40  files approximately . Thank you, Kathryn

    I believe I have figured it out - I need to flatten the image, even though there are no layers except for layer 0, first.

  • Powerpoint 2013 throwing 'File in Use' errors when saving to a network drive, file is NOT in use

    One of our sites is having a strange issue when saving to a network location in Powerpoint.  I'm not sure it's a Powerpoint problem, but it's a place to start...
    When saving a ppt to a mapped network drive (the client is running Windows 8 / Office 2013, the network drive is a DFS share, pointed to a Server 2012 machine if that matters), users will almost always get the following error:
    "Someone else is working in (filepath\name) right now. Please try again later." 
    This happens regardless of where the file is being saved on the network drive, in fact it happens even when there is no pre-existing file with that name in the location.  So, even if I'm saving a brand new copy of test.pptx to F:\Share\PPT where there
    is not currently a test.pptx, I get the error.
    Word, Excel, and all other tested apps save properly.  Powerpoint can save correctly to the local computer, but not to the network drive or to My Documents (which redirects to the same network drive).
    When the error pops up, if I look in Open Files in Computer Management on the Fileserver, I see the file I'm trying to save listed as being open, but it shows 'Disconnected' rather than a username.
    Any suggestions would be appreciated - again, not sure that this is a Powerpoint problem - could be Windows 8 or some mysterious DFS thing...
    Thanks.

    Hello,
    Been having a very similar issue in our environment and just came across this thread while Googling and looking for answers.
    In our case, we have Windows 7 clients and 3 main files servers - 2 are Server 2008 R2, and one is Server 2012.  We use PeerLink File Collaboration to sync the files between
    the servers (similar concept to DFS).  For us, it seems to happen specifically with Excel 2013, and only when saving to the Server 2012 file server.  I can reproduce the message pretty much every time.  After seeing your post,
    I tried it in Powerpoint just out of curiosity, but it saved properly - Word saves properly as well.  
    Been doing a bunch of testing to try and narrow it down, and this is what I've found:  
    Excel 2013 -> Server 2012 = error message.  
    Excel 2013 -> Server 2008 R2 = no error message.  
    Excel 2010 -> Server 2008 AND Server 2012 = no error message.
    <o:p>We've been leaning towards the PeerLink replication as the culprit up to this point, but last night I did some testing with the PeerLink Collaboration turned off, and
    still received the error message.. so now I'm even more confused! 
    I see that it's been a few months since your post..  have you made any progress here?</o:p>

  • Currently have 30K pics on PC Win. 7 laptop using  PSE 8, corrected issues and did full backup on portable hard drive plus saved (Extensive) Keyword tags to file.  Installed PSE 13 on PC Win 8.1 laptop.  Will attach same portable Hard drive to new laptop.

    Currently have 30K pics on PC Win. 7 laptop using  PSE 8, corrected issues and did full backup on portable hard drive plus saved (Extensive) Keyword tags to file.  Installed PSE 13 on PC Win 8.1 laptop.  Will attach same portable Hard drive to new laptop. How do I import prev Keyword Tags from file and Restore catalog from port. HD to new PC and in what order?  I have not opened PSE 13 on new PC yet. Would like to do it right the first time!

    No importing needed.
    See these instructions: Use Backup, Restore to move catalog | Organizer | Elements 6 or later

  • I created an image in Photoshop and saved it as the PSD file. Now when I try and open it it says it is not compatible with my version. How could this be when I created it in this version?

    I created an image in Photoshop and saved it as the PSD file. Now when I try and open it it says it is not compatible with my version. How could this be when I created it in this version?

    That depends on why it won't open.  Most of the time it means the file is corrupted and unlikely to be recovered. If you saved it right after adding or copying a LOT of layers - then it might just be the layer limit and we can attempt to recover it.

  • I edited a .nef file in Camera Raw and PSE 11 saved it as a .xmp file.  I cannot open it now.

    I edited a .nef file in Camera Raw and PSE 11 saved it as a .xmp file.  I cannot open it now.
    I am not sure if this is an issue but Windows does not recognize the .xmp file and give it an icon with the photo's picture.  On a related note, when I edited some .nef files and Windows saved it as .dng file, it too, like the .xmp file, Windows does not recognize the .dng file and give it an icon with the photo's picture.
    Do I need to download something to create this icon?

    PSE didn't save your file as an .xmp file. The .xmp file is not the image--that's still the .nef. The xmp file is what adobe calls a 'sidecar' file, just a record of the settings you used in the raw converter. As long as it's in the same place as the image, when you open the nef in ACR again, it will open where you left off, with the settings you chose.
    If you want to save as, you have two choices:
    1. Click the Open button in the raw converter window and save in the image format of your choice.
    2. Use the Save button in the raw converter to create a separate DNG file, which still must be opened in the raw converter and converted to an image format for use in other programs.

  • When creating PDF I get message "This file was saved to the Temporary Internet  Files Folder"

    about 80% of the time when I am creating a PDF Document using the Print to Adobe function I get the following message:
    "For your computers security, this file was saved to the Temporary Internet Files folder"
    "Do you want to open this folder?"
    It doesn't matter if I say yes I want to open the folder or not I can never locate the file.
    I am using Vista Ultimate 32. for an operating system.
    I have the following programs installed too:
    Office 2007 Enterprise
    Office 2007 Project Professional
    Office Visio Professional 2007
    As a antivirus I am using Trend Micro Internet Security Pro 2008
    Diskeeper 2008 Pro
    Nero 8
    Quicken Home and Business 2008
    WinRar
    I am using Microsoft Internet explorer V 7.0.6001.18000
    Thank you for your help. I have looked everywhere and I'm lost.

    You can get the same results (as turning protected mode off) by:
    (presuming you have an icon for Internet Explorer on your desktop or taskbar) -- right click the icon and pick "Run as administrator"
    I've got the same problem printing to pdf (Acrobat v8; problem's only in IE7) on a Dell Optiplex/Vista Business desktop machine (though not my T61/Vista Ultimate Thinkpad laptop) and the above resolves the issue for my desktop machine. Certainly not a fix but perhaps a clue to Adobe developers, on the [slim?] chance they read these posts.

  • Strange data saved by write to measurment file

    Hi all,
    I have developed a simple program that permits to visualize data from a channel, but it records data, just when the saving data button is pressed. Data are saved through write to measurment file, but unfortunately there is something wrong since the saved data is strange. In the attachment there are the VI file and the saved data.
    As you can see there are several header and dates are strange (i.e. the saving date is 23/12/1916) and I get much more sample than I should have. Why do I get this?
    Any suggestion is appreciated.
    23/12/1916
    Solved!
    Go to Solution.
    Attachments:
    simulated_data.xlsx ‏1426 KB
    read a channel and save data.vi ‏63 KB

    Your many headers may be because of this:
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Download manager is saving images as .aspx notebook file, instead of jpeg

    when i save image from internet, the download manager says it is saving it as a jpeg file but when i click on save, it saves it as as .aspx notepad file and i can't change it.

    See "File handling in Firefox 3 and SeaMonkey 2" and "Reset Download Actions":
    * http://kb.mozillazine.org/File_types_and_download_actions
    You may also need to clear the cache:
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"

  • My project need to be saved as a Video_TS/Audio_TS file for burning purposes with a company that does bulk burring. how do i go by this?

    my project needs to be saved as a Video_TS/Audio_TS file for burning purposes with a company that does bulk burring. how do i go by this?

    VIDEO_TS (and an empty audio_ts) folders are part of a standardised DVD structure.  So, what you need a DVD-authoring tool.  FCPX offers to create a very simple DVD, one movie, two designs (black or white), no menu, done.  Older Macs came pre-installed with iLife/iDVD  … export your project as a 'Master', drag into iDVD, select any design template ...   Apple axed 'disk creation' about 7 years ago ... the AppStore is crowded with other, convenient, consumer, template based  tools. Professional structured DVDs are only optional with obsolete DVDSP (part of FC-suite) or Adobe Encore .....

  • Hey guys, so I have a DVD stuck in the CD drive on my mac. It reads it as being in there, but I cannot eject it and it is causing my a lot of issues with my mac. If i try to eject it, Finder acts up and I have issues saving projects or even browsing files

    hey guys, so I have a DVD stuck in the CD drive on my mac. It reads it as being in there, but I cannot eject it and it is causing my a lot of issues with my mac. If i try to eject it, Finder acts up and I have issues saving projects or even browsing files. I feel like it interferes with iPhoto as well because it says it is locked and I have no rights to view it. I wanted to see if anyone else had/s this issue and how you fixed it before lugging it into the apple store and being without a computer for a few weeks...

    A few other suggestions here as well:
    http://osxdaily.com/2009/08/28/eject-a-stuck-disk-from-your-mac-dvd-super-drive/

  • Using the plsql type xmldom.DOMDocument in a java function

    Is it possible to call a java function from PLSQL passing in a
    xmldom.DOMDocument? If so, how?
    I have tried deploying the java function with input types of
    oracle.sql.ARRAY and oracle.sql.STRUCT. Neither of these works
    as the associated PLSQL package will not compile due to 'records
    not being supported'.
    I also tried changing the java function input parameter to the
    java type XMLDocument. When I did that, I didn't even get the
    opportunity to deploy the function; presumably because
    XMLDocument is not a PLSQL type.
    Can anyone help?

    Hi.
    The definition of INL_GET_PARTY_SITE_NAME:
    FUNCTION INL_GET_PARTY_SITE_NAME(p_line_group_rec INL_CUSTOM_PUB.inl_ship_headers_rec) RETURN VARCHAR2 IS
    l_party_site_name VARCHAR2(100);
    BEGIN
    l_party_site_name := 'Allied Manufacturing';
    URN l_party_site_name;
    END INL_GET_PARTY_SITE_NAME;
    Thanks.

Maybe you are looking for

  • Unable to see new role in environment

    An end user said that a role that was working last week is no longer available in the portal. No changes have been made to the system in the past week. A co-worker successfully imported this new role into the portal a week ago, but the change did not

  • Adobe Media Encoder - Random Coding Interrupts?

    Greetings all - I've been a long time reader to this forum and thought I would bring a recent issue to the brilliant guys that Adobe seems to attract. First the details: Win 7 64bit AMD Athlon X2 250 ATI Radeon 5770 (1GB GDDR5) 3 gig RAM Standard iss

  • How do I delete contacts on Skype on computer with...

    I have looked everywhere. But I cant seem to be able to figure out how I delete contacts off of my Skype. It was easy to do With my old computer wich had Windows 7. But noe With my new computer With Windows 8, it doesnt seem like Im able to delete co

  • All catalog images sideways (rotated 90 degrees)

    Using Lightroom 4.4. When I open the catalog, the default catalog or the previous import shows ALL images rotated 90 degrees. This seems to be true for 90% of my images. Some folders still show the correct orientation, but most are sideways. All the

  • User account not highlighted in preference pane, can't delete

    After using Migration Assistant to populate a new PB, I now have 2 admin accounts. After consolodating files, I am unable to delete the one that I don't need, but as it's not highlighted in the System Users/Groups Preference pane, a simple deletion d