Creating XML file using data from database table

I have to create an xml file by using the data in the table of multiples. The problem that I face is data are huge it's millions, so I was wondering is it possible efective for the creation of an XML of this type.

It would be great if you can suggest an approach to achieve my requirement.

Thank you
-Vinod

An example of the forum: Re: how to generate the XML from the database table

Published by: Marco Gralike on 18 October 2012 21:41

Tags: Database

Similar Questions

  • export data from the table in xml files

    Hello

    This thread to get your opinion on how export data tables in a file xml containing the data and another (xsd) that contains a structure of the table.
    For example, I have a datamart with 3 dimensions and a fact table. The idea is to have an xml file with data from the fact table, a file xsd with the structure of the fact table, an xml file that contains the data of the 3 dimensions and an xsd file that contains the definition of all the 3 dimensions. So a xml file fact table, a single file xml combining all of the dimension, the fact table in the file a xsd and an xsd file combining all of the dimension.

    I never have an idea on how to do it, but I would like to have for your advise on how you would.

    Thank you in advance.

    You are more or less in the same situation as me, I guess, about the "ORA-01426 digital infinity. I tried to export through UTL_FILE, content of the relational table with 998 columns. You get very quickly in this case in these ORA-errors, even if you work with solutions CLOB, while trying to concatinate the column into a CSV string data. Oracle has the nasty habbit in some of its packages / code to "assume" intelligent solutions and converts data types implicitly temporarily while trying to concatinate these data in the column to 1 string.

    The second part in the Kingdom of PL/SQL, it is he's trying to put everything in a buffer, which has a maximum of 65 k or 32 k, so break things up. In the end I just solved it via see all as a BLOB and writing to file as such. I'm guessing that the ORA-error is related to these problems of conversion/datatype buffer / implicit in the official packages of Oracle DBMS.

    Fun here is that this table 998 column came from XML source (aka "how SOA can make things very complicated and non-performing"). I have now 2 different solutions 'write data to CSV' in my packages, I use this situation to 998 column (but no idea if ever I get this performance, for example, using table collections in this scenario will explode the PGA in this case). The only solution that would work in my case is a better physical design of the environment, but currently I wonder not, engaged, as an architect so do not have a position to impose it.

    -- ---------------------------------------------------------------------------
    -- PROCEDURE CREATE_LARGE_CSV
    -- ---------------------------------------------------------------------------
    PROCEDURE create_large_csv(
        p_sql         IN VARCHAR2 ,
        p_dir         IN VARCHAR2 ,
        p_header_file IN VARCHAR2 ,
        p_gen_header  IN BOOLEAN := FALSE,
        p_prefix      IN VARCHAR2 := NULL,
        p_delimiter   IN VARCHAR2 DEFAULT '|',
        p_dateformat  IN VARCHAR2 DEFAULT 'YYYYMMDD',
        p_data_file   IN VARCHAR2 := NULL,
        p_utl_wra     IN VARCHAR2 := 'wb')
    IS
      v_finaltxt CLOB;
      v_v_val VARCHAR2(4000);
      v_n_val NUMBER;
      v_d_val DATE;
      v_ret   NUMBER;
      c       NUMBER;
      d       NUMBER;
      col_cnt INTEGER;
      f       BOOLEAN;
      rec_tab DBMS_SQL.DESC_TAB;
      col_num NUMBER;
      v_filehandle UTL_FILE.FILE_TYPE;
      v_samefile BOOLEAN      := (NVL(p_data_file,p_header_file) = p_header_file);
      v_CRLF raw(2)           := HEXTORAW('0D0A');
      v_chunksize pls_integer := 8191 - UTL_RAW.LENGTH( v_CRLF );
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      --
      FOR j IN 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
        WHEN 1 THEN
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,4000);
        WHEN 2 THEN
          DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
        WHEN 12 THEN
          DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,4000);
        END CASE;
      END LOOP;
      -- --------------------------------------
      -- This part outputs the HEADER if needed
      -- --------------------------------------
      v_filehandle := UTL_FILE.FOPEN(upper(p_dir),p_header_file,p_utl_wra,32767);
      --
      IF p_gen_header = TRUE THEN
        FOR j        IN 1..col_cnt
        LOOP
          v_finaltxt := ltrim(v_finaltxt||p_delimiter||lower(rec_tab(j).col_name),p_delimiter);
        END LOOP;
        --
        -- Adding prefix if needed
        IF p_prefix IS NULL THEN
          UTL_FILE.PUT_LINE(v_filehandle, v_finaltxt);
        ELSE
          v_finaltxt := 'p_prefix'||p_delimiter||v_finaltxt;
          UTL_FILE.PUT_LINE(v_filehandle, v_finaltxt);
        END IF;
        --
        -- Creating creating seperate header file if requested
        IF NOT v_samefile THEN
          UTL_FILE.FCLOSE(v_filehandle);
        END IF;
      END IF;
      -- --------------------------------------
      -- This part outputs the DATA to file
      -- --------------------------------------
      IF NOT v_samefile THEN
        v_filehandle := UTL_FILE.FOPEN(upper(p_dir),p_data_file,p_utl_wra,32767);
      END IF;
      --
      d := DBMS_SQL.EXECUTE(c);
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT
      WHEN v_ret    = 0;
        v_finaltxt := NULL;
        FOR j      IN 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
          WHEN 1 THEN
            -- VARCHAR2
            DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
            v_finaltxt := v_finaltxt || p_delimiter || v_v_val;
          WHEN 2 THEN
            -- NUMBER
            DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
            v_finaltxt := v_finaltxt || p_delimiter || TO_CHAR(v_n_val);
          WHEN 12 THEN
            -- DATE
            DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
            v_finaltxt := v_finaltxt || p_delimiter || TO_CHAR(v_d_val,p_dateformat);
          ELSE
            v_finaltxt := v_finaltxt || p_delimiter || v_v_val;
          END CASE;
        END LOOP;
        --
        v_finaltxt               := p_prefix || v_finaltxt;
        IF SUBSTR(v_finaltxt,1,1) = p_delimiter THEN
          v_finaltxt             := SUBSTR(v_finaltxt,2);
        END IF;
        --
        FOR i IN 1 .. ceil( LENGTH( v_finaltxt ) / v_chunksize )
        LOOP
          UTL_FILE.PUT_RAW( v_filehandle, utl_raw.cast_to_raw( SUBSTR( v_finaltxt, ( i - 1 ) * v_chunksize + 1, v_chunksize ) ), TRUE );
        END LOOP;
        UTL_FILE.PUT_RAW( v_filehandle, v_CRLF );
        --
      END LOOP;
      UTL_FILE.FCLOSE(v_filehandle);
      DBMS_SQL.CLOSE_CURSOR(c);
    END create_large_csv;
    
  • Unable to display data from database using persistence mobile A-team

    Hello

    We use the accelerator of persistence for Mobile A-team with application of the MAF. We built the REST services based for CRUD operations on a table. We are unable to use the POST CREATE service by application of the MAF. We tried using saveTask and addTask data control methods it generates automatically. Although it is saved locally to the iterator of data control, it doesn't push the data from database. We tried to test the service REMAINS independent and works well.

    Can anyone help regarding if lack us measures in the same?

    Thank you

    Vignesh

    Vignesh,

    Indeed, there are two issues here:

    -the attributes of the payload are different

    -the structure of the payload is different, the GET request has an attribute "Task" that returns an array, the POST request submitting a single object through the attribute "taskDetails.

    By default, the accelerator of persistence assumes that the POST request has the same payload structure and attributes as the GET request that you used to 'discover' the data objects.

    However, you can easily change this as follows:

    -To add additional attributes required in the POST, you should restart the wizard REST-JSON directly access the data object attributes screen and click on the button 'add an attribute '. Add each attribute you need in the POST request and the attribute name to the value required in the POST request payload. No matter that this attribute of the payload does not exist in the payload GET, it will be ignored during extraction of the tasks.

    -To fix the second issue, you must change the persistence - mapping.xml:

    -go to the createMethod task

    -Remove the payloadElementName attribute

    -Add the payloadRowElementName attribute and set the value to "TaskDetails.

    It's a little strange that you post in order to get other attributes, it is there another resource GET that returns all attributes for a task?

    In addition, you cannot derive columns audit as created_by on the server-side? It's a bit unusual set these values at the level of the customer.

    Steven.

  • Is it possible to see/get the data from the table to a dump file

    I have files dmp generated using expdp on oracle 11 g...

    expdp_schemas_18MAY2013_1.dmp

    expdp_schemas_18MAY2013_2.dmp

    expdp_schemas_18MAY2013_3.dmp

    Can I use a settings file given below to get the data from the table in the file sql or impdp the only option to load the data of table in database.

    VI test1.par

    USERID = "/ as sysdba".

    DIRECTORY = DATA

    dumpfile=expdp_schemas_18MAY2013%S.dmp

    SCHEMAS = USER1, USER2

    LOGFILE = user_dump_data.log

    SQLFILE = user_dump_data. SQL

    and impdp parfile = test1.par.

    No,

    DataPump cannot retrieve a dumpfile data in a flat file.

    Dean

  • extract data from a table to a text file

    I need to extract data from a table to a text file, I twist my output is the following...

    bash-3. $00 vi tap3roamercosts_20110915144318.txt
    lines of 'tap3roamercosts_20110915144318.txt' 393948, 23464348 characters
    ^ LAFGTD | N | 2011090203000001 | 13242514000064 | 1. 0 | 20. 41220 | 02-SEVEN.-11. 01-SEPT.-11. 0 | 13244
    755. 64. 70. 0093794428588 | 0093796234547 | 0 | S2 | E | 412200306902634 | 8. 1. 61500 | 16081 |
    | HW | Call to the Roamer. 0 | I have | Roaming billing Inroamer Plan | 1_0_1 | LKA | N_I_Independent
    the time of day. Rate of Roamer SMST systems | AFGTD20110902030000010001013242514000064 |
    |||||||||||||||||||||

    AFGTD | N | 2011090203000001 | 13242612000044 | 1. 0 | 20. 41220 | 02-SEVEN.-11. 01-SEPT.-11. 0 | 13244
    853. 44. 70. 234. 0093793252818 | 0 | S2 | E | 412200303198150 | 8. 1. 61000 | 12403 | HW | -Ro
    bitter call | 0 | I have | Roaming billing Inroamer Plan | 1_0_1 | N_I_Independent time of Da
    There | Rate of Roamer SMST systems | AFGTD20110902030000010001013242612000044 |
    ||||||||

    AFGTD | N | 2011090203000001 | 13242612000047 | 1. 0 | 20. 41220 | 02-SEVEN.-11. 01-SEPT.-11. 0 | 13244
    853. 47. 70. 234. 0093793252818 | 0 | S2 | E | 412200303198150 | 8. 1. 61000 | 12403 | HW | -Ro
    bitter call | 0 | I have | Roaming billing Inroamer Plan | 1_0_1 | N_I_Independent time of Da
    There | Rate of Roamer SMST systems | AFGTD20110902030000010001013242612000047 |
    ||||||||
    .
    .
    .
    .
    .

    Please help me how to format my output each record in simple lines in oracle sqlplus. Here are the settings I used...

    TERMOUT OFF SET;
    SET ECHO OFF;
    SET LINESIZE 100000;
    THE VALUE OF NEWPAGE 0;
    SET SPACE 0;
    SET PAGESIZE 50000;
    SET FEEDBACK OFF;
    SET THE OFF POSITION;
    SET TRIMSPOOL
    SET THE TAB

    And what was wrong with the answers that you have on your previous thread?

    How to extract data in a text file

    Please do not ask the same question again. If there is a problem with the answers provided, then continue on the same thread that tell people what is the problem.

    Saying that, this is another possibility for you...

    As user sys:

    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    /
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /
    

    As myuser:

    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
      END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      --
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
          ELSE
            v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
          END CASE;
        END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    

    This allows the header line and the data to write into files separate if necessary.

    for example

    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    
    PL/SQL procedure successfully completed.
    

    Output.txt file contains:

    empno,ename,job,mgr,hiredate,sal,comm,deptno
    7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
    7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
    7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
    7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
    7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
    7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
    7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
    7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
    7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
    7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
    7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
    7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
    7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
    7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10
    

    The procedure allows for the header and the data to separate files if necessary. Just by specifying the file name "header" will put the header and the data in a single file.

    Adapt to the exit of styles and different types of data are needed.

  • How to ETL extract data from database Oracle 11.1 using Cognos Data Manager 10.1

    Hello

    I need to run the IBM Cognos Data Manager 10.1 version ETL tool for extracting data from the Oracle11.1 database.

    My understanding is that, from the point of view of database, the best way would to have a stored procedure that will provide a reference cursor in the ETL client tool.

    However, a database procedure the ETL tool running seems not to be possible in this version of the data manager.

    If someone has done this before? What is the best way for this snippet to do?

    Thank you

    Emilija

    Annabelle says:

    My reading of original question: "What is the best way for this snippet to do?"

    Sorry - is NOT helping.

    The BEST way to extract data from a table is to use a SELECT statement.

    You said you want to do.

    So just repeat your original question instead of those that ask you to answer will not move forward us.

  • Message from blackBerry Smartphones: the page you requested was created using data from the form.

    While closing a link to expedia.ca a message come to say: the page you requested was created using data from the form. This page is no longer available.  If you resend the data, any action that has been specified by the form will be repeated.  You want to resubmit the data?  When I click Yes or no, nothing happens except that the message just reappears.  I can't get rid of it so I can't do anything else on my phone, except to answer a call if someone calls me.  How can I get rid of this message from my phone?  I tried to turn it works... even by leaving off the coast for 5 minutes before turning turn it back on.  I can't even check my OS because I do not what anyone on my phone.  I hope someone can help me with this.

    Have you tried a battery pull?  This should fix a problem as you described.

    With your phone, remove the battery, then replace a minute later.  This will do all sorts of wonderful things to your phone for free unclaimed memory, delete no cited source points and make your phone run smoothly.

    Try it and let us know if it does the trick.

  • Export data from the table

    Hello. Is it possible to export data from a table in Oracle using SQL Loader? If Yes, can you tell a good examples?

    Hello

    Hello. Is it possible to export data from a table in Oracle using SQL Loader?

    No, with SQL * Loader, you can load data from external files into tables not export.

    coil c:\temp\empdata.txt
    sqlplus abc.sql (assumes that abc.sql runs select * from emp)
    spool off

    It cannot work like this, because the declaration of the COIL is not recognized outside the SQL * Plus the term.

    But, you can include the statement of the COIL in abc.sql like this:

    spool c:\temp\empdata.txt
    select * from emp;
    spool off
    

    Then, you just have to run the SQL script as follows:

    sqlplus  @abc.sql 
    

    However, I advise you to use Oracle SQL Developer, this is a free tool and with it you can export a Table in several types of format (html, xml, csv, xls,...).

    Please find attached a link to this tool:

    http://www.Oracle.com/technetwork/developer-tools/SQL-Developer/Overview/index.html

    Hope this helps.
    Best regards
    Jean Valentine

  • import data from database 8i to 11 g R2

    Hi all

    I try to import the exported data from database 8i to Oracle 11 g server. I find in the import log.

    Export file created by EXPORT: V08.01.07 by conventional means
    import in WE8MSWIN1252 and AL16UTF16 NCHAR character set
    import server uses WE8ISO8859P1 (possible character set conversion) character set
    Customer export uses WE8ISO8859P1 (possible character set conversion) character set
    export server uses WE8ISO8859P1 NCHAR (possible ncharset conversion) character set

    is this normal?

    I have several version of the client installed on the client computer.

    I find in HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE > NLS_LANG = AMERICAN_AMERICA. WE8ISO8859P1
    in HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE > KEY_OraClient11g_home1 > NLS_LANG = AMERICAN_AMERICA. WE8MSWIN1252

    Is it normal that the the NLS_LANG on the same client have different values?

    Thank you

    YES, you can check the compatibility of * compatibility matrix for export and import between different Versions, Oracle [Video] [132904.1 ID] *.

  • How to export data from the table with the colouring of cells according to value.

    Hi all

    I use jdeveloper 11.1.1.6

    I want to export data from the table with a lot of formatting. as for color cells based on value and so much. How to do this?

    You can find us apache POI-http://poi.apache.org/

    See this http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html

  • Create XML file

    I use AIR and the class FileStream to save the file locally, but I don't "know how to create the XML file using ACE. I think I should use something like this:

    var xmlPoincon:XML = new XML();

    But I don't know how to create the XML node, then the values.

    Kind regards

    Daniel Cantin

    Here is a simple code snippet:

    private function createXML(): void{
        var xm:XML = ;
        var nodeName:String = "EMPLOYEENAME";
        var nodeValue:String = "KUMAR";
        var xmlList:XMLList = XMLList("<"+nodeName+">"+nodeValue+"");
        xm.appendChild(xmlList);
        Alert.show(xm);
    }
    

    The most important here is the appendChild() method, which allows you to add a node that you have built.

    http://flexonblog.WordPress.com/2008/02/04/generate-XML-data-dynamically-in-Flex/

    If this post answers your question or assistance, please mark it as such. Thank you!

    http://www.stardustsystems.com
    Adobe Flex development and Support Services

  • Create XML file dynamically textInput fields

    Hello

    I am very new to Flex and trying to create an application that creates XML files on the computer that is local to the user, based on a users entry in textInput fields.

    For the moment I'm having trouble figuring out how to dyamically create a XML file external at all, ideally when the user press a key a browseForSave dialog will open allowing the user to select somewhere on their hard drive to create the XML file.

    Can someone give me some advice what I should go in the direction?

    Thank you

    If this post has answered your question or helped, please mark it as such.

    You can use a SharedObject for small files, but in general the Flex has no access to the local hard disk.


    http://www.Adobe.com/2006/mxml '.
    Initialize = "init ()" > "
     
        public var mySO:SharedObject;
         
    public void init (): void {}
    OSJM = SharedObject.getLocal ("mydata");
    If {(mySO.data.myData!=null)}
    var XML = mySO.data.myData;
    fname.text = xml.fname;
    Lname.text = xml.lname;
    xml.email = email.text;
    }
    }

    private function storeData (): void {}
    var xml =
              ;
    If (fname.text! = "") {}
    xml.appendChild ({fname.text});
    }
    If (lname.text! = "") {}
    xml.appendChild ({lname.text});
    }
    If (email.text! = "") {}
    xml.appendChild ({email.text});
    }
    mySO.data.myData = xml;
    mySO.flush ();
    }
     
    private function resetData (): void {}
    mySO.clear ();
    fname. Text = "";
    Lname. Text = «»
    email. Text = "";
    }
    ]]>
     
     
       
         
       

       
         
       

       
         
       

     

     
     
     

  • Creating XML files

    Hello

    I know this is going to sound very vague, but what is a good way to create XML files, so there is some sort of connection with the scan operation? Find it me easier to say

    out=fileConnection.getOutputStream();
    out.write( (""+fileName+").getBytes() );
    

    etc. but I know it's very stupid and source of errors. And after writing the file, I discovered that BlackBerry has no MIME type that are associated with. Any suggestions?

    try to use the write() method (like what I did in my first message) instead of writeChars()

    in fact, I would recommend the tree as follows to reduce errors in construction:

    DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();            DocumentBuilder builder=factory.newDocumentBuilder();            Document doc=builder.newDocument();
    
                Node root=doc.createElement("SyncMyNetConfig");            doc.appendChild(root);
    
                Node n_tmrConnect=doc.createElement("tmrconnect");            Text tx_tmrConnect=doc.createTextNode(tmrConnect+"");            n_tmrConnect.appendChild(tx_tmrConnect);            root.appendChild(n_tmrConnect);
    
  • Inserting data from one table to another table

    Hello

    I have the following SQL where I am updating a table by adding new data from another table, but without success.

    INSERT INTO
    () TOP_PROSPECTS
    COMMON_ID
    DATE_ADDED
    REVIEW_RANK
    EVAL_DATE
    PM_ASSIGN
    WHY_NOTES)
    SELECT
    t.COMMON_ID
    t.DATE_ADDED
    t.REVIEW_RANK
    t.EVAL_DATE
    t.PM_ASSIGN
    t.WHY_NOTES
    Of
    TEMP_IVAN_MARY t
    WHERE
    COMMON_ID <>t.COMMON_ID

    Any suggestions?

    Thank you.

    Published by: user13822709 on August 14, 2012 09:14

    Published by: user13822709 on August 14, 2012 09:15

    Is that what you're trying to do with the insert. I think there may be a sign {noformat}<{noformat}{noformat}>{noformat} missing in the where clause. This site eat those, so you need to use the equivalent! = post here.

    If I'm wrong about the missing trader, then it looks like you want to insert rows in temp_ivan_mary that are not already in top_prospects. If Yes, then you need something like:

    insert into top_prospects
       (common_id, date_added, review_rank, eval_date, pm_assign,
        why_notes)
    select t.common_id, t.date_added, t.review_rank, t.eval_date,
           t.pm_assign, t.why_notes
    from temp_ivan_mary t
    where t.common_id not in (select common_id from top_prospects
                              where common_id is not null)
    

    Function index and data available volumnes etc. then a mergr can be more effective. Something like:

    merge into top_prospects p
       using (select common_id, date_added, review_rank, eval_date,
                     pm_assign, why_notes
              from temp_ivan_mary) t
       on (p.common_id = t.common_id)
       when not matched then
          insert (common_id, date_added, review_rank, eval_date, pm_assign,
                  why_notes)
          values (t.common_id, t.date_added, t.review_rank, t.eval_date,
                  t.pm_assign, t.why_notes)
    from temp_ivan_mary t
    

    John

  • java.io.FileNotFoundException for newly created XML file

    Hello

    I created an xml file called config.xml under public_html\WEB-INF.

    When I tried to read this xml from the java class file, I make
    java.io.FileNotFoundException: public_html\WEB-INF\config.xml
     (The system cannot find the path specified.)
    My version of Jdev is
    10.1.3.04
    How can I solve this? What is the correct path to call my newly created xml file from anywhere in the project is java JSP?

    Concerning

    Published by: Chackochen on August 2, 2010 01:48

    Published by: Chackochen on August 2, 2010 01:58

    Hi Chackochen,

    Try this and see...

    FacesContext context = JSFUtils.getFacesContext ();
    ServletContext servletContext = (ServletContext) context.getExternalContext () .getContext ();
    Path String = servletContext.getRealPath("/WEB-INF/config.xml");
    = New File (path);

    Kind regards
    Suganth.G

Maybe you are looking for

  • better, more narrow, more appropriate research

    Forgive me my ignorance, but there are options in a drop down menu that you could use to search better. Like-search must contain these words - should not contain these words must have these words in the title and etc... FF may not have it but some br

  • Tecra 8100: Question on battery and adapter

    I had problems with my 8100 stopping himself so I returned to the store and he exchanged the battery, he only gave me a battery 10.8V my charger and the laptop 15v and are now my charger cable started to melt and melted through the carpet.so I need t

  • My printer is on the list to be able to print apps but when I try to do it says it can't

    I have a HP Deskjst 3510 e-All-In-One printer. It is on the list of HP printers that can print apps. When I try it tells me it's impossible. Someone from HP told me that it is because I do not have a touch screen. So what's the point of this printer?

  • close the class constant

    Use the classes in lvclass to 8.6, if I create an instance of a class, do I need to delete?  For example, if it were a RefNum, I would use the close Reference.vi to dispose of it.  Should this be done with a constant of class?  And if so, how?

  • having problem to connect with itunes and update my iphone

    I have problem to connect with itunes and update my iphone. Everyone that nows how to fix this?