Handle multiple xml files as input?

I have a java parser which uses JDOM and translates xml file to a flat file. Currently it handles one file at a time. I want to handle if there are multiple such files. Have anyone of you encountered that?
Could you please help? Thanks.....

How about multiple xml files as argument and let your Java class handle them one by one?
Or probably even better: it should be possible to get all the names of the xml files in a directory and let you class handle those one by one. Like this you don't need the arguments and just process all the xml files in maybe a dedicated directory.
Kind regards,
Hans.

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.

  • Split XML in Multiple XML files with Java Code

    Hi guys , i have following xml file as input ....
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <T0020
    xsi:schemaLocation="http://www.safersys.org/namespaces/T0020V1 T0020V1.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.safersys.org/namespaces/T0020V1">
    <INTERFACE>
    <NAME>SAFER</NAME>
    <VERSION>04.02</VERSION>
    </INTERFACE>
    <TRANSACTION>
    <VERSION>01.00</VERSION>
    <OPERATION>REPLACE</OPERATION>
    <DATE_TIME>2009-09-01T00:00:00</DATE_TIME>
    <TZ>CT</TZ>
    </TRANSACTION>
    <IRP_ACCOUNT>
    <IRP_CARRIER_ID_NUMBER>274845</IRP_CARRIER_ID_NUMBER>
    <IRP_BASE_COUNTRY>US</IRP_BASE_COUNTRY>
    <IRP_BASE_STATE>AR</IRP_BASE_STATE>
    <IRP_ACCOUNT_NUMBER>55002</IRP_ACCOUNT_NUMBER>
    <IRP_ACCOUNT_TYPE>I</IRP_ACCOUNT_TYPE>
    <IRP_STATUS_CODE>100</IRP_STATUS_CODE>
    <IRP_STATUS_DATE>2007-11-06</IRP_STATUS_DATE>
    <IRP_UPDATE_DATE>2009-08-03</IRP_UPDATE_DATE>
    <IRP_NAME>
    <NAME_TYPE>LG</NAME_TYPE>
    <NAME>A P SUPPLY CO</NAME>
    <IRP_ADDRESS>
    <ADDRESS_TYPE>PH</ADDRESS_TYPE>
    <STREET_LINE_1>1400 N OATS</STREET_LINE_1>
    <STREET_LINE_2/>
    <CITY>TEXARKANA</CITY>
    <STATE>AR</STATE>
    <ZIP_CODE>71854</ZIP_CODE>
    <COUNTY>MILLER</COUNTY>
    <COLONIA/>
    <COUNTRY>US</COUNTRY>
    </IRP_ADDRESS>
    <IRP_ADDRESS>
    <ADDRESS_TYPE>MA</ADDRESS_TYPE>
    <STREET_LINE_1>P O BOX 1927</STREET_LINE_1>
    <STREET_LINE_2/>
    <CITY>TEXARKANA</CITY>
    <STATE>AR</STATE>
    <ZIP_CODE>75504</ZIP_CODE>
    <COUNTY/>
    <COLONIA/>
    <COUNTRY>US</COUNTRY>
    </IRP_ADDRESS>
    </IRP_NAME>
    </IRP_ACCOUNT>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    </T0020>
    and i want to take this xml file and split it into multiple files through java code like this ...
    File1.xml
    <T0020>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    </T0020>
    File2.xml
    <T0020>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    <IRP_ACCOUNT> ..... </IRP_ACCOUNT>
    </T0020>
    like wise...
    Each xml file contain maximum 10 or 15 IRP_ACCOUNT.
    Can somebody please help me ? How can i do it with stax like start element and all ?
    thanks in advance.

    Ah, sorry, strike that. You want multiple files. I think the easiest way is to simply parse with DOM. [http://www.w3schools.com/xpath/default.asp] . And here [http://www.w3schools.com/xpath/default.asp].
    You can output the various XML elements using a PrintWriter or creating a separate DOM document for each file you want to create and serializing that.
    - Saish

  • IE running under XP can't handle multiple SWF files, Why?

    I noticed that IE 8 running under Windows XP cannot handle multiple swf files in one page.
    Up to about 10 files is no problem they are loaded and we can play them ( buttons that start a small audio file).
    But more of these files in one page will stop IE.
    Firefox ( 3.6.28) runs them fine.
    And also IE 8 and/or Firefox under Windows 7 handles them perfectly.
    Has anyone any idea what can cause this and how to resolve this?
    Thanks,
    Onno Tomson
    The Netherlands

    Sorry...I still don't get it. What is it about Windows FUS that keeps iTunes from running running the process twice? It can run many other non-Apple windows apps in multiple user sessions (commercial apps, open source apps, audio/video apps, networked apps). I can even run two different virtual machines at the same time under two different user sessions.
    Why can iTunesHelper.exe run twice but iTunes.exe cannot? Why can I run Safari at the same time? Quicktime Player runs fine under multiple user sessions.
    Blaming it on Windows and/or FUS sounds like FUD. Can anyone give a valid technical reason? Semaphores? Mutexes? An admission (and explanation) that the Windows version is purposely crippled?

  • 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

  • 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 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

  • 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

  • Creating multiple XML files from Schema

    We are extracting data from Oracle DB into XML using ODI. We are successful in generating the XML file, using command "create xmlfile <file name> from schema <Schema Name>, but the entire data comes in Single file.
    Our database schema is relatively Huge and we would like to generate multiple XML files. We want to generate one file per particular number of records. Can anyone help to do this.

    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.

  • Loading multiple XML files

    My problem:
    I have multiple XML files to load and each must pass a param
    to the loadedXML function below. How do I do this correctly. I have
    the loading part down, but I cannot get the param to pass.
    I was trying to feed another param to the onLoad function but
    it wouldnt take anything else except its "success" param. And I
    know that its clearly wrong (the prefix param that is). Is there a
    better way to do this? In my example I do not show the fact that I
    AM going to load muliple files within a loop.... im really trying
    to get that param passing to work.

    got it working now.
    i done a trace and it seemed the xml files were loading fine,
    it was a problem somewhere else in my code.
    Ive now ran into another problem.
    Ive got a movie clip with my xml menu inside it and an
    actionscripted blur filter on it.. so that when the user rollsover
    the mc it goes from blurry, to clear and back again on roll out.
    Problem is as the mc more or less thinks its a button, its
    stealing focus from the menu.
    Is there a way around this? or is there a better way of
    coding a blurfilter menu other than rollover?
    any help would be appreciated.
    Chris.

  • Multiple XML files

    This is pretty strange. I have multiple XML files on my work computer. My iTunes is pretty much screwed up, it can't hold a library at all.
    I have two different drives that have these XML files on it. My main C drive and a shared P drive which is primarily used for syncronizing my laptop to the main server.
    How do I manage these XML files (as you cannot delete them).
    Thanks All,
    (2) 5th Generation iPod's (white) - iPod Shuffle   Windows XP   (work - IBM Think Pad), (home - 20' iMac)

    Thanks Curt,
    just for others....  My Function for reading XML:-
    let XmlImportedFile = (FilePath, FileName) =>
    let
    Source = Folder.Files(FilePath),
    File = Source{[#"Folder Path"=FilePath,Name=FileName]}[Content],
    ImportedXML = Xml.Tables(File)
    in
    ImportedXML
    in
    XmlImportedFile
    then it's use to combine into a custom Column:-
    let
    Source = Folder.Files("C:\Users\Tim\Data\Education\Collect\XML files January 2014"),
    InsertedCustom = Table.AddColumn(Source, "XmlImportedFiles", each XmlImportedFile([Folder Path],[Name])),
    RemovedColumns = Table.RemoveColumns(InsertedCustom,{"Content", "Name", "Extension", "Date accessed", "Date modified", "Date created", "Attributes", "Folder Path"}),
    #"Expand XmlImportedFiles" = Table.ExpandTableColumn(RemovedColumns, "XmlImportedFiles", {"Name", "Header", "School", "Pupils"}, {"XmlImportedFiles.Name", "XmlImportedFiles.Header", "XmlImportedFiles.School", "XmlImportedFiles.Pupils"})
    in
    #"Expand XmlImportedFiles"
    thanks again and great blog post :-)
    Thank you for you time folks!

  • 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.

  • Is there any way to upload Tariff Code (with multiple XML files) from application server?

    Hi All,
    Is there any way to upload Tariff Code (with multiple XML files) from application server?. Its urgent.
    Regards,
    Jatin

    Hi Jatin,
    Yes, of course you can upload multiple files for tariff codes.
    This can be done by the below path:-
    SAP GTS Cockpit(tcode-/sapsll/menu_legal)-->Customs Management-->Classification-->Classification Master Data-->Upload Tariff Code Numbers from XML file(tocde- /SAPSLL/LLNS_UPL101).
    In the above area after browsing and choosing the first file, please select multiple check box to choose more files as well. Then you can further select your application server and upload all those files in one go.
    PS:- Although, we have an option to upload multiple such files but actually we should avoid multiple file uploads due to various reasons. Hence, please take utmost care during such procedure.
    Regards,
    Aman

  • Handling multiple XML message types in a webservice

    My below scenario is
    I have a webservice that receives XML messages from third party. The webservice populates 3 database tables through Mediator and DBAdapter from these XML files. Data for each table comes in a single XML file. How will I design the single werbservice to receive all the three different types of messages. eg: Customer, Order, OrderItem.
    My WSDL is given below:
    <?xml version= '1.0' encoding= 'UTF-8' ?>
    <wsdl:definitions
    name="receiveData"
    targetNamespace="http://xmlns.oracle.com/sca/soapservice/receiveData"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:inp1="http://xmlns.oracle.com/pcbpel/adapter/db/top/Order"
    xmlns:tns="http://xmlns.oracle.com/sca/soapservice/ESTAProcessing/receiveData" >
    <wsdl:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" >
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/Order" schemaLocation="xsd/Order.xsd" />
    </schema>
    </wsdl:types>
    <wsdl:message name="requestMessage">
    <wsdl:part name="request" element="inp1:Order"/>
    </wsdl:message>
    <wsdl:portType name="execute_ptt">
    <wsdl:operation name="execute">
    <wsdl:input message="tns:requestMessage"/>
    </wsdl:operation>
    </wsdl:portType>
    </wsdl:definitions>
    Any similar example will be really good. Let me know if it does make sense. Here what I am looking for is whether a single operation can handle all three types of XML schema defintions and if yes how to put that in the WSDL

    Technically you can do with XSD switch option however you should rethink towards your design of accepting three different message in single web service. specially the case you have taken customer and order.

Maybe you are looking for

  • Creative Audigy 4 Pro probl

    <SPAN>I have the speaker system Sven HT-485 and sound card Creative Audigy 4 Pro. As to me correctly to connect all this through the external module of the sound card that worked normally. And I connect that, but through a coaxial and optical there i

  • Problems viewing Canon Raw Files

    Currently my company has CS3. We received some camera raw files that were taken with a Canon 5D Mark II. We cannot open them in Photoshop. One of the employees has CS4 and were successfully able to open the files because they have version 5.6 of Came

  • Flex, Printing / Create PDF  without Server?!?

    Hi, after some days of searching a printing solution for flex without using a server or using a second languag (Java), I found the following solutions: www.alivepdf.org and www.bentbit.com Is there something else out there?!?!? I can not understand w

  • EventListener function specific to generated display object container

    This has to be simple, if only I knew how. I'm an AS3 newbie, and am having difficulty setting up multiple specific EventListeners within a code generated display object container. I am generating a 'page' (Sprite) with a heap of 'cards' (Sprites) on

  • Auto execution job error

    Hi Experts, I am working on Database version: 10.2.0.5.0 (10G). Currently I got stuck with one error: ORA-12012: error on auto execute of job 163~ORA-06550: line 1, column 96:~PLS-00201: identifier 'PROC_REF_MV_AMENDMENT' must be declared~ORA-06550: