Need to store multiple xml files as each record in oracle table

Hi All,
I have a set of XML files (say 20 xml files). I need to store the enitire content of each file as a string into the oracle table.
Do we have any PL/SQL procedures which will do this job. I will pass the path of the directory to the procedure, so that it takes all the xml files and store it in the table.
After that i need to remove some tags of the xml. so it will be better if we store records as a string rather than of xmltype.
Please help in achieving this.
Thanks in Advance,
Ram Mohan T

Hi Gyanchand,
I have wrote an article BizTalk Server 2010: Grouping
and Debatching/Splitting Inbound Messages (TypedPolled) from WCF-SQL Adapter  which is for SQL, but yes same can be done with Oracle.
If grouping is not required then, you can overlook it and apply debatching only.
Maheshkumar
S Tiwari|User
Page|Blog|BizTalk
Server: Multiple XML files to Single FlatFile Using File Adapter

Similar Messages

  • 1 xml file to multiple xml files with 200 records in each

    Hello Experts,
    I have below scenario.
    Please suggest me which might be the best approch to work on.
    1) XML file to XML file
    I will have 1 pretty huge XML file which i need to break in multiple XML files with 200 records each.
      1) first approch i can have bpm in which i can split the file according to my requirement.
      2) Second approch i can create 2 scenarios in which 1st scenario will pick up XML file and create multiple flat files with File content conversion. Second scenario will pick up all these flat files and create XML files.
    2) XML file to XML file
    Or i can have multiple files with 1 record per file and i need to merge in multiple XML files with 200 records in each.
    So its kind of 1:N or M:N scenarios.
    Please tell me which is might be better performance and design wise.
    Or if you have any idea in any other way i can do this, then please reply as soon as possbile.
    Please tell me if you have OS command for the same or some script to run or anything which i can implement.
    Thanks,
    Hetal

    what is your senario? is it File to File?
    You can use multi mapping concept without BPM. You can handle the 200 records per message logic in the multimapping.
    Regards,
    Praveen Gujjeti.

  • Need to load multiple xml Files in ODI.

    I have successfully loaded on file by creating a topology for that xml file only.
    But I am facing issue when I created a variable based topology and now trying to load a different file.
    The variable based topology is like
    JDBC URL for XML Data Server is  :
         jdbc:snps:xml?f=#GLOBAL.GV_XML_FILENAME&re=MAIN&ro=false&case_sens=true&nobu=false&dod=true
    For physical schema i have created :
    SCHEMA : - #GLOBAL.GV_XML_PHYSICAL_SCHEMA
    SCHEMA (WORK) : #GLOBAL.GV_XML_PHYSICAL_SCHEMA
    Now I have created a package where I am initializing these tow variables first, and then calling the interface.
    The package gets executed successfully when same filename and same schema name is passed for which I have created a hardcoded dataserver and physical schema.
    Bue when I try to pass another xml file 2009D2.XML and a new  physical shcema, name 2009D , it gives error.
    ODI-1227: Task SrcSet0 (Loading) fails on the source XML connection Chrysler_var_ds.
    Caused By: java.sql.SQLException: unexpected token: 2009
      at com.sunopsis.jdbc.driver.xml.SnpsXmlStatementRedirector.executeQuery(SnpsXmlStatementRedirector.java:223)
      at com.sunopsis.jdbc.driver.xml.SnpsXmlStatement.executeQuery(SnpsXmlStatement.java:49)
      at com.sunopsis.jdbc.driver.xml.SnpsXmlSchema.initializeSchema(SnpsXmlSchema.java:1170)
    Please provide me any solution if any one of you have done this.
    Also provide me step if i am missing any.

    Thanks Alex, I was able to solve my issue with some help from your code. I rebuilt your valueObject class as a reference point to rebuild my arrays and parse the data into the grid. Works like a charm now. Thank you for your help. On a side note, I marked your blog as a regular read.
    ~ Ryan

  • Loading xml file of 1GB in a oracle table

    Could any one help me out , how can i load a xml file of large size in a oracle table
    using pl/sql developer.
    Thanks

    Hi,
    I am also trying to process large XML file but getting the following error. The code works fine if the smaller size file. Could you please help me how can I process and upload the XML file of more than 10MB size into an oracle table. The table structure does not match at all to the xml tags. I am trying with the following code.
    ERROR at line 1:
    ORA-04031: unable to allocate 2520 bytes of shared memory ("large
    pool","unknown object","session heap","koh-kghu session heap")
    ORA-06512: at "VMI_USER.PKG_VMI_FILE_UPLOAD", line 978
    ORA-04031: unable to allocate 1000 bytes of shared memory ("large
    pool","unknown object","qmxlu subheap","qmemNextBuf:alloc")
    ORA-06512: at line 1
    I am using Oracle 10g and having the following method to process the xml file to upload it's contents in the database table conditionally:
    PROCEDURE pr_process_xml_file(pin_xml_file_name IN VARCHAR2)
    IS
    l_bfile BFILE;
    l_clob CLOB;
    l_parser dbms_xmlparser.parser;
    l_doc dbms_xmldom.domdocument;
    l_nl dbms_xmldom.domnodelist;
    l_n dbms_xmldom.domnode;
    l_nl_party dbms_xmldom.domnodelist;
    l_n_party dbms_xmldom.domnode;
    l_nl_nad dbms_xmldom.domnodelist;
    l_n_nad dbms_xmldom.domnode;
    l_nl_line dbms_xmldom.domnodelist;
    l_n_line dbms_xmldom.domnode;
    begin
    -- the xml file to process
    l_bfile := BFileName('DATA_DIR',pin_xml_file_name);
    -- Create temporary lob
    dbms_lob.createtemporary(l_clob, cache=>FALSE);
    -- open xml file in readonly mode
    dbms_lob.OPEN(l_bfile, dbms_lob.lob_readonly);
    -- load the file contents in the clob
    dbms_lob.loadfromfile(l_clob,l_bfile,dbms_lob.getlength(l_bfile));
    -- close the xml file
    dbms_lob.CLOSE(l_bfile);
    -- create a parser
    l_parser := dbms_xmlparser.newparser;
    -- parse the document and create a new DOM document
    dbms_xmlparser.parseclob(l_parser,l_clob);
    l_doc := dbms_xmlparser.getdocument(l_parser);
    -- free resources associated with the parser now it is no longer required
    dbms_lob.freetemporary(l_clob);
    dbms_xmlparser.freeparser(l_parser);
    -- get a list of all the DOCUMENT nodes in the document using the XPATH systax
    l_nl := xslprocessor.selectnodes(xmldom.makenode(l_doc),'/TRADING/DOCUMENT');
    -- loop thru the list and create a DOCUMENT record
    FOR cur_doc IN 0 .. xmldom.getlength(l_nl) - 1
    LOOP
    .. here I process the contents of file tag by tag and load them in the stagging table first
    END LOOP;
    .. Here I load the data from stagging table to target oracle table.
    xmldom.freedocument(l_doc);
    end;
    This works fine if the size of the xml file is smaller like 1-2 MB but not for large file.
    Please help.
    Thanks - Pawan

  • Multiple xml files on single page

    On the page:
    http://hudsonintranet.jubileedesign.com/staff_resources/staff_directory/index.htm
    I have a multiple tabs. I need to use multiple xml files (one for
    each tab) and I can't figure out how to do it. I am new to xml. Any
    tips, is this possible?
    Thanks,
    Trisha

    Sorry.
    Th code is wporking fine.
    The file names are sorted.
    Thats why i was not able to see the files.

  • Splitting of a CSV File with Multiple Records into Multiple XML File

    Dear All,
    <b> I am doing a Scenario of CSV to XML Files. I am using BPM for the same. My incoming CSV File has got multiple records. I want to break this Multiple records into Multiple XML Files having one record each.</b>
    Can someone suggest how can I break this rather Split this into Multiple XML Files.
    Is Multimapping absoltely necesaary for this. Can't we do this without Multimapping. Can we have some workaround in the FCC parameters that we use in the Integration Directory.
    Kindly reply ASAP. Thanks a lot to all in anticipation.
    Pls Help.
    Best Regards
    Chakra and Somnath

    Dear All,
    I am trying to do the Multimapping, and have 0....unbounded also. Someways it is not working.
    <b>
    Smitha please tell me one thing...Assigning the Recordsets per Message to 1, does it mean that it will write multiple XML Files as I want.</b>
    Also I am usinf Set to Read only. So once the File is read it becomes RA from A. Then will it write the other Records.
    I have to use a BPM because there are certain dependencies that are there for the entire Process Flow. I cannot do without a BPM.
    Awaiting a reply. Thanks a lot in anticipation.
    Best Regards
    Chakra and Somnath

  • Store/persist XML file on ABAP stack

    Hi everybody,
    as the ABAP Database is a relational DB, I wonder where to store a XML file. Is there a dedicated table?
    Thanks
    Regards Mario
    Edited by: Mario Müller on Sep 10, 2008 2:21 AM

    hi
    try with this function module SMUM_XML_PARSE for parsing xml document into a table structure
    also check this document for how an abap prog take xml and convert into an abap internal table
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f50dcd4e-0501-0010-3596-b686a7b51492
    convert an xml file into abap internal table using sap dom approach
    XML DOM Processing in ABAP part II - Convert an XML file into an ABAP table using SAP DOM Approach.
    regards
    kummari

  • HR - XI - External System: one IDOC to multiple XML Files

    Hi,
    I have a scenario where I need, out of one HRMD_A07 IDOC send multiple XML files:
    The IDOC and the XML files can the Master data for many employee (IDOC has max of 200 as of SAP, external system, max of 1000).
    The IDOC will be generated with change pointers with all the needed filters (I can add/remove if needed).
    My goal is to generate 3 types of XML files:
    - 1 for the persons (containing basic info like name, firstname, persnr,etc)
    - 1 for the various unit (with basic info of unit like number, description & name)
    - 1 for the links between persons and units (this person is linked with that unit)
    The structures of the 3 XML files are know and can be imported via XSD definition.
    Do I need to use BPM for doing so or is there a way to do that with simple mapping?
    If BPM is needed, as I new to that, if you have a link to a begginer guide, fell free to send it
    Cheers,
    greg

    hi,
      For your scenario there is no need of BPM.
      In message mapping select the message tag.
      In the target add 3 message types.
      Just map the fields.Go to Interface mapping add the 3 message in the target.
      Get the mapping.
      In ID sender agreement,Receiver Determination is same.
      In Interface Determination select extended.Get the mapping.
      Create 3 Receiver agreement for each Receiver.
    Regards,
    Prakasu

  • Loading multiple XML files into one XMLList

    I am working on an app where I will load a list of recipes.  Each recipe is an XML file.  I would have an XML file that lists the filenames that need to be loaded.  I am assuming in can use one HTTPService and loop through this list, and set the url and do myService.send() until all the xml files have been loaded and concatenated into one xml list. True?
    My main question here is how do I load each XML file and add it to the same XMLList?
    Assume each XML file's root tag is <recipe>.  I want to create an XMLList with the root  <recipes> with each <recipe> as a first child.
    Thanks.

    Why don't you use the Data centric workflows which will help you to deal with multiple XML files as AS objects? Something like this
    1. Create a HTTPService using Data menu -> Connect to HTTPService
    2. create a operation getRecipe and enter your URL example URL: http://myserver/recipe?name=recipename
    3. Use Configure Return Type to tell that this method returns a Recipe class
    4. Use DataBinding to bind the result of this to a DataGrid
    Call the following in a loop and
    recipeName = myRecipes+ // All of your recipe names, Recipe is a ArrayCollecition
    Recipe.setAt(i) = Svc1.getRecipe(recipeName);
    At the end you would have a Recipe[]
    This is one of the ways you could work instead of having a XMLListCollection and use e4x etc. to go through your collection.
    Let us know if this helps, or you are looking for something else.
    Thanks
    -Sunil

  • Question about creating multiple XML files from same query

    I have a query like this:
    select * from emp;
    ename empno deptno
    Scott 10001 10
    Tiger 10002 10
    Hanson 10003 20
    Jason 10004 30
    I need to create multiple output files in xml format for each dept
    example:
    emp_dept_10.xml
    emp_dept_20.xml
    emp_dept_30.xml
    each file will have the information for employees in different departmemts.
    We are using DBMS_XMLGEN package to generate XML.
    The reason I need to do this is to avoid executing the same query 200 times for generating the same output for different departments. Please let me know if it is practically possible to do this.
    Any input is greatly appreciated.
    Thanks a lot!!

    one solution i can think of is to use SQLX operator instead of dbms_xmlgen.
    here is a sample example.
    declare
      l_xmltype xmltype;
      l_deptno  emp.deptno%type;
    begin
      for i in (select * from emp order by deptno)
      loop
        select xmlconcat(
                    xmlelement("ename", i.ename)
                   ,xmlelement("sal", i.sal)
                   ,xmlelement("detpno", i.deptno))
          into l_xmltype from dual;
        dbms_output.put_line(l_xmltype.GetClobVal());
      end loop;
    end;
    /Now here you can open the query once, keep writing to the file till the deptno
    is same, when the deptno changes, close the file and open a new file with new
    deptno and start writing.
    Note : in this way you will have to add the xmlprolog manually to each of the file which should not be an issue. after opening the file add the prolog string manually.
    Hope this helps.

  • Generate multiple XML files from one Invoices file in AR Selected Invoices

    I have converted our Oracle EBS 11i Selected Invoice RAXINV.rdf to XML and created a template for XML Bursting. I'm bursting fine at the:
    /ZRAXINV/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_CF_NO/G_CF_NO. My question is since I'm writing out my pdf output invoices to the filesystem on Sharepoint; I also need to archive the XML part of each invoice broken down by the same group as .//LIST_G_CF_NO/G_CF_NO. When I convert the rdf to XML it produces one XML file from which I created the templates.
    My requirement is to archive both the individual invoices from the templates and the corresponding XML pieces on Sharepoint so that we will be able to search and link the xml to the pdf written out to the filesystem on Sharepoint.
    Any idea how should go about this requirement will be much appreciated.
    Thanks,
    Leo

    So how does it take this file
    file>
    <statement>
    <name>John Dow </name>
    <address>123 Main</address>
    <phone>972-213-3434</phone>
    </statement>
    <statement>
    <name>Jane Dow </name>
    <address>345 Main</address>
    <phone>972-213-3534</phone>
    </statement>
    <statement>
    <name>Marry Dow </name>
    <address>678 Main</address>
    <phone>972-213-3435</phone>
    </statement>
    </file>
    and create these three different one?
    1.)
    <statement>
    <name>John Dow </name>
    <address>123 Main</address>
    <phone>972-213-3434</phone>
    </statement>
    2.)
    <statement>
    <name>Jane Dow </name>
    <address>345 Main</address>
    <phone>972-213-3534</phone>
    </statement>
    3.)
    <statement>
    <name>Marry Dow </name>
    <address>678 Main</address>
    <phone>972-213-3435</phone>
    </statement>
    Is it not going to just grab each element after the file tag? I'm just confused about that.

  • How to dpwnload one XML file for each report row

    Hi all,
    i have a report on the products table with about 1000 rows
    desc of table products
    product_id varchar (10)
    product_desc varchar2 (2000)
    I would like to download on the file system an xml file for each row of the report
    the nane of each xml file = <product_id>.xml
    thanks in advance
    km

    Hi,
    You would probably find it better to search on the PL/SQL forum as this is more their area than Apex.
    From what I can see in there (and there are a number of examples that would help you), you need to do something like:
    DECLARE
    vPATH VARCHAR2(50) := '/DEV';
    vFILENAME VARCHAR2(50);
    vFILE UTL_FILE.FILE_TYPE;
    BEGIN
    FOR C IN (SELECT PRODUCT_ID, PRODUCT_DESC FROM PRODUCTS)
    LOOP
      vFILENAME := C.PRODUCT_ID || '.xml';
      vFILE := UTL_FILE.FOPEN(vPATH, vFILENAME, 'W');
      UTL_FILE.PUT_LINE(vFILE, '<xdr>');
      UTL_FILE.PUT_LINE(vFILE, '<product_id>' || C.PRODUCT_ID || '</product_id>');
      UTL_FILE.PUT_LINE(vFILE, '<product_desc>' || C.PRODUCT_DESC || '</product_desc>');
      UTL_FILE.PUT_LINE(vFILE, '</xdr>');
      UTL_FILE.FCLOSE(vFILE);
    END LOOP;
    END;I haven't included exception handling etc and you should check on the PL/SQL forum to see if there are better examples!
    Andy

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • Link multiple  XML files  stored in oracle database

    Link multiple XML files
    Can any one give some code example regarding my issue:
    If I have for example file1.xml stored in one relational table and another file2.xml stored in another table ….etc
    And I want to put link and reference which will make me able to link these files and make query or insert…etc
    May be I need to use Xlink, Xpoiner or Xinclude . But if this is the solution to this problem please can you give a simple example that will help to understand the solution especially that I want to develop my project in oracle and I will register xml schema to insert the xml files in the database
    Thanks lots and I am waiting for your solution

    no answer for my question
    is this thread is a write place or I have to move my query to another part of the forum
    thanks

  • Need to store multiple session values in flex

    Hi,
         I need to store multiple session values in flex based on the user who logged in.
    For Example, if a user logged in as an administrator and in another windows another user logged in as guest, i need to maintain two seperate session for the two different users.
    Is it possible for maintaining different sessions.
    Expecting your valuable response.
    Thanks
    Jude Paul

    Look at Shared Objects. You can store this information in them by creating a unique object for each type of user.

Maybe you are looking for