Saving XML files

I have to download an XML file and save it to a file so that I can upload it to another programme.  Although I can view it when I ry to save it I can't seem to get it to save in a form that I can use to upload.  Can anyone help?

Appendix - A in Building Oracle XML Applications by Steve has great deal of explanation and some helper paxkage, check it out.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jason Cohen ([email protected]):
You can save it using a BFILE datatype. This is just a pointer to a filesystem location. Read more about BFILE's in the Oracle documentation.
Also, check out the Oracle XML Portal site at www.webspedite.com/oracle. <HR></BLOCKQUOTE>
null

Similar Messages

  • Error while saving xml file using PDFDocument API

    Hi,
    I am trying to save xml file using byte array obtained from interactive form element in webdynpro java.
    The file gets saved but I get fllowing error message when I open the file.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    An invalid character was found in text content. Error processing resource 'http://uxjciesk.wdf.sap.corp:50000/irj/go/km/doc...
    The code I am trying to achieve the functionality is:
    byte[] byteArray  = wdContext.currentContextElement().getPdfSource();
    IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();
    IWDPDFDocumentAccessibleContext documentAccessibleContext = pdfDocumentHandler.getDocumentAccessibleContext();
    documentAccessibleContext.setPDF(byteArray);
    IWDPDFDocument pdfDocument = documentAccessibleContext.execute();
    ByteArrayInputStream dataInputStream = (ByteArrayInputStream) pdfDocument.getPDFAsStream();
    further, the datainputstream is used to store the file. I am able to save same xdp template in pdf file format successfully, the error only occurs for xml file storage.
    Please, advise.
    Regards,
    Urvashi

    Hi Urvashi,
        Try this code
              String contentStr = getXMLData(wdContext.currentContextElement().getPdfSource().read(false));
              String data = "";
              ByteArrayOutputStream pdfSourceOutputStream = new ByteArrayOutputStream();
              try {
                   InputStream pdfSourceInputStream = wdContext.currentContextElement().getData().read(false);
                   BufferedInputStream bufferedInputStream = new BufferedInputStream(wdContext.currentContextElement().getData().read(false));
                   int aByte;
                   while ((aByte = bufferedInputStream.read()) != -1) {
                        pdfSourceOutputStream.write(aByte);
                   pdfSourceOutputStream.flush();
                   pdfSourceOutputStream.close();
                   IWDPDFDocument pdfDocument = null;
                   try {
                        // Create an instance for PDFDocumnetHandler
                        IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();
                        //Create an Inatance for PDFDocumentAccessibleContext
                        IWDPDFDocumentAccessibleContext documentAccessibleContext =     pdfDocumentHandler.getDocumentAccessibleContext();
                        //set the pdf data as OutputStream to the PDFDocumentAccessibleContext instance
                        documentAccessibleContext.setPDF(pdfSourceOutputStream);
                        //call the server to get the data                      
                        pdfDocument = documentAccessibleContext.execute();
                        //get the xml data in a InputStream
                        ByteArrayInputStream dataInputStream = (ByteArrayInputStream) pdfDocument.getData();
                   } catch (Exception e) {
                        data = "Null";
              } catch (IOException e) {
    Regards,
    Mathan

  • Saving xml files in oracle database

    hi all
    anyone who could tell me how can i save xml files in the database?

    In order to provide an intelligent answer we need much more information. Please describe the problem you are trying to solve in more detail. The kind of information that would help is
    Database Version ?
    What is the source of the XML Files ?
    What is the size of the Files ?
    How are they stored prior to wanting to load them into the database, on the database server or on a client ?
    What is you preferred programming language ?
    What kind of querys to do you want to run against the files once they are stored in the database ?
    Note if your database version is pre 9i then the question can be better answered in the forum Technologies -> XML -> General
    I can move you post there if appropriate

  • Extract data from xml file to Oracle table

    hello to all members of forum..i have this stored procedures:
    create or replace
    PROCEDURE INSERTXML2(
    p_xml_in XMLType,
    p_table IN VARCHAR2 ) AS
    v_context DBMS_XMLStore.ctxType;
    v_rows NUMBER;
    BEGIN
    insCtx := DBMS_XMLStore.newContext(p_table); -- get saved context
    dbms_xmlstore.setRowTag(insCtx,'Row');
    DBMS_XMLStore.clearUpdateColumnList(insCtx); -- clear the update settings
    -- set the columns to be updated as a list of values
    DBMS_XMLStore.setUpdateColumn(insCtx,'ORDERNUMBER');
    DBMS_XMLStore.setUpdateColumn(insCtx,'PLANT');
    DBMS_XMLStore.setUpdateColumn(insCtx,'MATERIAL');
    DBMS_XMLStore.setUpdateColumn(insCtx,'LINENUMBER');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'NOMSPEED');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'STARTDATE');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'FINISHDATE');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'TARGETQTY');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'UNIT');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'SYSTEMSTATUS');
    v_rows := DBMS_XMLStore.insertXML(insCtx, xmldocument);
    -- Close the context
    DBMS_XMLStore.closeContext(insCtx);
    END;
    that works well in little XML files but in XML files that are bigger the stored procedures to not work because string maximum length in Oracle is 4000..can anyone know a solution to pass over this problem?!?!
    one more thing im working with Oracle SQL Developer and Sap Mii, the XML file is generated in Sap Mii and then i have to pass it in one step to database..my one step is this stored procedure
    one more thing im working with Oracle SQL developer and SAP Mii
    regards and thanks in advance
    matinha
    Edited by: user11098081 on 23/Abr/2009 7:11

    You can use CLOB for big files.
    http://saubbane.blogspot.com/2010/12/saving-xml-file-into-table-with-plsql.html

  • I am in hurry,how to save  the xml file without attributes

    i have the following xml file with attributes,
    <?xml version="1.0"?>
    <Ve2.Configuration>
         <Ve2.Displaymanager>
              <type type="combobox">eVeDisplayStandardType</type>
              <setCounter type="bool">false</setCounter>
              <frames type="textfield">20</frames>
         </Ve2.Displaymanager>
    </Ve2.Configuration>
    but i want to save it without attributes, that means, my saved xml file look like this.:
    <?xml version="1.0"?>
    <Ve2.Configuration>
         <Ve2.Displaymanager>
              <type >eVeDisplayStandardType</type>
              <setCounter >false</setCounter>
              <frames20</frames>
         </Ve2.Displaymanager>
    </Ve2.Configuration>
    how can i do it with java.

    If you know the format of the XML file, then you can write a straight forward XSL file to transform it.
    Paul
    www.codetelligence.com

  • Read XML file problem

    Hi all,
    I am trying to read an xml file and display the output. i get a blank display. Can anybody please help me out.
    Thanks in advance
    I cant attach the xml file. Since its not a valid extension. Please find the xml code below.
    <Company>
    <Name>Samsung</Name>
    <Location>
    <City>Busan</City>
    <Country>South Korea</Country>
    </Location>
    </Company>
    Regards,
    KM
    Solved!
    Go to Solution.
    Attachments:
    Read Data from XML File.vi ‏9 KB

    If you can change saved .xml file, you can modify it to be compatible with Labview XML shema and use Unflatten from XML like in your VI. If you cannot, you should use XML Parser library. In attachement you can find 2 exmaples for these situations.
    Attachments:
    Modified XML file.vi ‏12 KB
    XML Parsing 1.vi ‏20 KB

  • I saved docs from a iMac to a flashdrive but when I plug the flashdrive into an iBookG4 and try to open the docs on the flashdrive, I get this message: Doc 2 cannot be opened. The required index.xml file is missing.

    I saved docs from a iMac to a flashdrive but when I plug the flashdrive into an iBookG4 and try to open the docs on the flashdrive, I get this message: Doc 2 cannot be opened. The required index.xml file is missing. Does this mean that I can't use the info on the flashdrive with the iBookG4 or can I do something to get the required index.xml file?
    Thanks
    jt

    It appears if you write the document with newer version Pages and try to open it older version Pages.

  • Error while saving the FM8 XML file

    Hello,
    While saving the FM8 XML file, an error message appears (see attached screen shot).
    Is there a solution to resolve this issue? Please suggest.

    Hi,
    This type of error is non-descript and could be caused by any number of things. It is impossible to troubleshoot from here based solely on that message. Let me ask a couple of questions, though:
    - Are you using structured FrameMaker? If so, are you using a structured app that has worked successfully before? In other words, did this just suddenly start happening to an otherwise-stable process?
    - Is there anything unusual about your layout; that is, anything other than a single text flow with graphics?
    Russ

  • FrameMaker crashes when saving a file as XML

    Hello -
    I am encountering a problem saving a .fm file as a .xml file. I have saved many .fm files as .xml files in the past with no issues. However, lately FM crashes with a "serious error" on certain files when I try the same save process. My initial thought was that the file was somehow corrupted, but this morning I ran into this scenario: I have 3 FM licenses in my office, I was trying to save a .fm file as .xml and FM kept crashing. So I had another co-worker try to save the exact same file as a .xml file and it WORKED!?!?!?!
    We all were using FM 11, but I have since installed FM 12 thinking that version 12 wouldnt have the same problem, but the same issue is happening with both versions of FM. I read that FM has issues when working across a network so I have tried it both ways, across the network and locally and the same issue occurs.
    Again, this problem occurs occasionally on various files - not every file, but as previously mentioned I was able to successfully save a file on a different machine that I could not save on my machine. I have the most recent log file that was generated after a crash:
    [*** LOG FILE REMOVED BY MODERATOR***]
    Thanks in advance for any help in this matter.
    Gavin

    An update -
    So FM now appears to crash "sometimes" when saving as an xml file AND when saving the file in general. I have 3 machine with FramMaker installed, first with version 11 now with version 12. These 3 machines are all identical as far as SW running on them, etc... I have been unable to detect a pattern as to when FM will crash thus far. Sometimes it will crash when I try to save the file as an .xml file and sometimes it will save just fine. I have resorted to marking up the document a little at a time, saving the file, then trying to save as an XML file. It will work sometimes and other times it will crash. Sometimes it crashes when trying to save the .fm file other times it works; sometimes it will crash when I try to save the .fm file as a .xml file, other times it will work. About the only thing in common that I have found thus far is the fact that it happens with the same file over and over again; meaning that if I have a pool of 12 files that I need to load into FM and markup, 11 of the 12 files may work just fine and the 12 file will not - it will crash FM at some point in the markup/saving process every time. One might guess that the original file is somehow corrupt and that may be, but at this point I am not sure how I prove that is the case as FM seems to load it in just fine and I can save it right off the bat just fine. Does anyone know how I can prove that the structured file i receive initially is corrupt when it loads into FM fine? If we were causing some issue with the import of our modified EDD then why dont we have the same issue with the other 11 files in the batch as they all are using the same EDD?
    I have sent my most recent log files to adobe tech support this morning. I have tried saving files on shared drives as well as on local drives. I have tried the same process on the other workstations with the same results.
    Does anyone have ideas on how I can isolate a problem with the source file (structured doc) or on why FM is crashing when I perform these actions?
    Thanks,
    Gavin (Ryan)

  • I saved a Pages doc yesterday and today I can't open it because I get a message that the doc is missing an index.xml file. Help!

    I saved a Pages doc yesterday and today I can't open it because I get a message that says "can't open doc because an index.xml file is missing."  Help!

    Pages v5 documents do not have an internal index.xml file. When you attempt to open one of these with the older Pages '09, you will get that dialog. Double-click the document icon, or right-click, and open with Pages v5 to access the document contents.

  • I am trying to open a document I saved on a previous version of Pages, but ever since I updated, I get a message: "couldn't be opened: the required index.xml file is missing". Can anyone help me here?

    I am trying to open a document I saved on a previous version of Pages, but ever since I updated, I get a message: "couldn't be opened: the required index.xml file is missing". Can anyone help me here?

    Check this thread with possible answer from PeterBreis
    Pages & Mavericks - "The required index.xml file is missing."
    What can I do to open a pages file she I get this message"the required index.xml file is missing" ?

  • Saving Croatian characters in XML file

    Hi,
    I'm trying to save Croatian characters into an XML file by using the windows-1250 encoding. For some reason, that doesn't work. Only the � and � characters (in upper and lower case) are OK. All other characters turn into ? signs, if you open the xml file.
    Here's my code:
    import org.dom4j.DocumentHelper;
    import org.dom4j.Element;
    import org.dom4j.Document;
    import org.dom4j.io.XMLWriter;
    import org.dom4j.io.OutputFormat;
    import java.io.*;
    public class test {
      public static final String ENCODING = "windows-1250";
      public static void main( String[] args ) {
        Element root = DocumentHelper.createElement( "XMLTest" );
        Document doc =  DocumentHelper.createDocument( root );
        Element elem = root.addElement( "t1" );
        try {
          String test = "&#269;&#263;��&#273;&#268;&#262;��&#272;";
          String x = new String(test.getBytes( ) , ENCODING);
          elem.setText( x );
          OutputFormat format = OutputFormat.createCompactFormat();
          format.setEncoding( ENCODING );
          format.setTrimText( false );
          FileOutputStream out = new FileOutputStream( new File( "testtest.xml" ) );
          XMLWriter writer = new XMLWriter( out, format );
          writer.setEscapeText( true );
          writer.setMaximumAllowedCharacter(255);
          writer.write( doc );
          writer.close();
        catch ( UnsupportedEncodingException e ) {
          e.printStackTrace();
        catch ( FileNotFoundException e ) {
          e.printStackTrace();
        catch ( IOException e ) {
          e.printStackTrace();
    }Thanks in advance for any help.
    Greet

    I assume that your java file has been saved in an encoding that can support the croatian characters?
    The problem is then probably in this area:
    String test = "&#269;&#263;��&#273;&#268;&#262;��&#272;";
    String x = new String(test.getBytes( ) , ENCODING);
    elem.setText( x );There is no need to encode a String. The only time an encoding becomes important is when converting from a String to bytes or converting bytes into a String.
    Try this instead:
    elem.setText("&#269;&#263;��&#273;&#268;&#262;��&#272;");By the way, there should be no need to escape the text in the XMLWriter.

  • Automate the process of saving Framemaker documents (*.fm) as Xml Files

    Hi,
    I am new to framemaker. We have a list of Framemaker document files (*.fm files) coming  into a folder.  We need to pick up these files and convert to xml format (same as the saveAs opertion from the File menu).
    I have written the follwing function to Save fm files to xml
    Code to Save fm files to xml files
    function saveAsXml (doc) {
       // Get required parameters for the save function.
        var params = GetSaveDefaultParams();
        var returnParamsp = new PropVals();
        // Replace the .fm extension with .mif.
        var saveName = doc.Name.replace (/\.[^\.\\]+$/,".xml");
        var i = GetPropIndex(params, Constants.FS_FileType);
        params[i].propVal.ival = Constants.FV_SaveFmtXml;
        // Save the document as XML.
        doc.Save(saveName, params, returnParamsp);
    How to automate this process so that code checks -
    1) New fm files in the folder
    2) Saves the fm file as xml
    3) Moves the saved fm file to a different folder
    Thanks,
    GC
    [Message moved to Scripting Forum by moderator]

    Have a look at the sample script below. The "while" loop waits for the specified number of milliseconds, then reads the contents of a directory and processes every individual file in the directory. In my example, it just prints the file path to the console. You would replace this part with your Open / Save as / Move sequence.
    For more file system commands, refer to Adobe's Javascript Tools Guide, "File object functions".
    var stop = false;
    while( stop==false ) {
        // Wait for 20.000 ms
        $.sleep(20000);
        var fld = new Folder("c:/incoming");
        var filesInFld = fld.getFiles("*.fm");
        for(var f=0; f < filesInFld.length; f++) {
            // process the individual file
            $.writeln(filesInFld[f]);
        // Exit the  loop after 19:00
        var time = new Date();
        if( time.getHours() > 19 ) stop = true;

  • Saving an XML File

    If I try to save a file (well-formed xml) with the extension of .xml through NTFS protocol I get an error. Same xml file but with a .txt extension is saved fine. This file is created with Notepad. Using Win2000 and iFS1.1. Thanks for any help.
    Error is: H\TestSearch.xml
    The file is on a network drive with create but no modified privileges.
    Ask the administratorof this network to change this condition.
    null

    <?xml version="1.0"?>
    <docs>
    <doc id="222">
    <name>HB123.xml</name>
    <folder>/BillDrafting/ga92/Drafts</folder>
    <owner>John Doe</owner>
    <lastMod>02/05/2001</lastMod>
    </doc>
    </docs>
    No dtd, no custom class.

  • Generating XML from SQL queries and saving to an xml file?

    Hi there,
    I was wondering if somebody could help with regards to the following:
    Generating XML from SQL queries and saving to a xml file?
    We want to have a procedure(PL/SQL) that accepts an order number as an input parameter(the procedure
    is accessed by our software on the client machine).
    Using this order number we do a couple of SQL queries.
    My first question: What would be our best option to convert the result of the
    queries to xml?
    Second Question: Once the XML has been generated, how do we save that XML to a file?
    (The XML file is going to be saved on the file system of the server that
    the database is running on.)
    Now our procedure will also have a output parameter which returns the filename to us. eg. Order1001.xml
    Our software on the client machine will then ftp this XML file(based on the output parameter[filename]) to
    the client hard drive.
    Any information would be greatly appreciated.
    Thanking you,
    Francois

    If you are using 9iR2 you do not need to do any of this..
    You can create an XML as an XMLType using the new SQL/XML operators. You can insert this XML into the XML DB repository using DBMS_XDB.createResource. You can then access the document from the resource. You can also return the XMLType containing the XML directly from the PL/SQL Procedure.

Maybe you are looking for

  • I can't view dataTable in JSF

    Hi, anyone who can help me with java server faces, i want to put data from a resultset to dataTable, i made everithing but my table is not visible. My code is: <?xml version='1.0' encoding='windows-1252'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP

  • Publisher name in Item info for PDF is not displayed

    Hi All, Publisher name in Item info for PDF is not displayed (shows; unkown publisher) in Adobe Digital Editions. The Adobe Acrobat Professional does not have "Publisher" field to add Publisher name; it facilitates user to provide "Title", "Author",

  • Oracle Siebel Adapter with Bpel or Oesb - SBL-JCA-00200

    Hi ALL, i am facing a problem by using Oracle Adapter for Siebel inside Soa Suite. mar., 2 déc. 2008 18:30:08.0343 CET - Thread[AWT-EventQueue-0,6,main] [info ] [IWAF JCA] [container] Loaded and initialized adapter class 'com.ibi.file.FileListenerAda

  • Front Row on Mavericks?

    Hey I now have Mavericks and I used to have Mountain Lion and I remeber I found some way to enable Front Row.... I used it a lot in Mountain Lion but is there a way to make it work in Mavericks as well? I have the icon still in my applications but wh

  • 2 basic questions on SSO?

    We are trying to implement SSO for our Forms based application. I have a few things to clarify. (1.) Can we configure Oracle SSO to get credentials from the Windows/Linux User login? I.e. user does not have to login to the Oracle Forms applications.