Help on how to read the content of an XML file from the payload

I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
I’m trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
In the Bean I want to read the content of the attached XML file, it could be the “order number”.
The filename should then be “Order number”.XML.
<u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
<i><b>Frank</b></i>

hi,
check this: http://jakarta.apache.org/poi/

Similar Messages

  • How can I login and retrieve my user file from the trash?

    I was trying to find out where all my HD had gone, which a did using ‘What Size’.
    I found what looked like an old backup file so I put the file in the trash.
    It turns out that the file was my user file. So now I can’t login to as the user.
    How can I login and retrieve my user file from the trash?

    The Digital Editions forum is here, in case this is what you are talking about:
    http://forums.adobe.com/community/adobe_digital_editions
    If you are not, I apologize for the misunderstanding.

  • How to get the absolute path of a file from the local disk given the file n

    how to get the absolute path of a file from the local disk given the file name

    // will look for the file at the current working directory
    // this is wherever you start the Java application (cound be C: and your
    // application is located in C:/myapp, but the working dir is C:/
    File file = new File("README.txt"); 
    if (file != null && file.exists())
        String absolutePath = file.getAbsolutePath();

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • Export the Biztalk error to a file from the Biztalk project.

    Hi,
    I have created console app in VS 2012 to export the biztalk errors from Event Viewer to a text file.
    Here i have used eventlog class to fetch the application log errors on click of .Exe file it will generate the the text file.
    So I need to integrate this .exe or .net code to Biztalk project. How can i integrate this one. Any idea on this - how can i achieve this.
    Biztalk handles error but i need to export that biztalk error which occured in the application in to seperate text file in a location. Because  each time user needs to go to Adminstrative console then to EventViewer->Windows log->Application - >
    to view the Biztalk error. In this case i need to export the errors to a text file from the project instead of going to view error in Admin Console. i need some code samples on how to make it.
    But in .net we can achieve it using EventLog class to export the event viewer appplication log to a text file.As i said in first Earlier.Whether it can be integrate in to biztalk project through Custom Pipeline or any other way.
       

    Hi Vijayan,
    What is the objective of your requirement? Is this just to save user from going through Administrative console
    à EventViewer->Windows log->Application - > Filter event for BizTalk error?
    In this case you can create a custom event log for BizTalk and hold the events related to BizTalk in one node/category. So you’re users can directly to eventlog for
    Biztalk error. (FYI event log can be access without going through BizTalk admin console). So users can view information/warning/error specific to BizTalk in one view
    EventVieweràCustom
    viewàBizTalk.
    No automated steps required, just a simple one off configuration would do the trick. Read the following article on step-by-step guidance on achieving the same.
    Creating a custom event log under Event
    Viewer to log server events
    Or is requirement is due to some access issues you want to accumulate/consolidate all the BizTalk errors into one place so user can see BizTalk evenlog info in one place like
    a text file in a shared location, then the following article can help you to achieve the same.
    http://blogs.technet.com/b/heyscriptingguy/archive/2007/09/06/how-can-i-backup-an-event-log-to-a-text-file.aspx
    But what do you mean by integrate above process in to BizTalk. When you mean by “Biztalk handles error but i need to export that biztalk error which occured in the application
    in to seperate text file in a location”, are you looking to log the BizTalk “application” error/events i.e logging from your applications in BizTalk to a log file ? Then you can consider about using standard logging library like Enterprise
    Library Logging block, or NLog, or log4net. log4net can fit
    well comparing other logging framework.
    Following references can help you on this context:
    Write log file for Biztalk Logging
    with log4net – Sample
    Biztalk and Logging with log4net
    But keep in mind that this is application logging, i.e. logging from your BizTalk applications like logging while processing the message in pipeline/orchestration. But this will
    not log when one of the send port/receive location is stopped. These information are logged into eventlog.
    If you’re looking for application level logging then also know about
    BizTalk CAT Instrumentation Framework Controller. 
    Or if you want to your existing console application which exports the eventlog to text file to be automated, then use the Windows schedule task to run your console application
    periodically and let it export the errors to text file. You can console the export process in such a way that it can export the eventlog entries for the last one hour if you can configure the Windows schedule task to run every one hour to export the logs to
    text file.
    I have given various options, hope you can choose the one which suits your need best.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How to export a data as an XML file from oracle data base?

    could u pls tell me the step by step procedure for following questions...? how to export a data as an XML file from oracle data base? is it possible? plz tell me itz urgent requirement...
    Thankz in advance
    Bala

    SQL> SELECT * FROM v$version;
    BANNER
    Oracle DATABASE 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS FOR 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    5 rows selected.
    SQL> CREATE OR REPLACE directory utldata AS 'C:\temp';
    Directory created.
    SQL> declare                                                                                                               
      2    doc  DBMS_XMLDOM.DOMDocument;                                                                                       
      3    xdata  XMLTYPE;                                                                                                     
      4                                                                                                                        
      5    CURSOR xmlcur IS                                                                                                    
      6    SELECT xmlelement("Employee",XMLAttributes('http://www.w3.org/2001/XMLSchema' AS "xmlns:xsi",                       
      7                                  'http://www.oracle.com/Employee.xsd' AS "xsi:nonamespaceSchemaLocation")              
      8                              ,xmlelement("EmployeeNumber",e.empno)                                                     
      9                              ,xmlelement("EmployeeName",e.ename)                                                       
    10                              ,xmlelement("Department",xmlelement("DepartmentName",d.dname)                             
    11                                                      ,xmlelement("Location",d.loc)                                     
    12                                         )                                                                              
    13                   )                                                                                                    
    14     FROM   emp e                                                                                                       
    15     ,      dept d                                                                                                      
    16     WHERE  e.DEPTNO=d.DEPTNO;                                                                                          
    17                                                                                                                        
    18  begin                                                                                                                 
    19    OPEN xmlcur;                                                                                                        
    20    FETCH xmlcur INTO xdata;                                                                                            
    21    CLOSE xmlcur;                                                                                                       
    22    doc := DBMS_XMLDOM.NewDOMDocument(xdata);                                                                           
    23    DBMS_XMLDOM.WRITETOFILE(doc, 'UTLDATA/marco.xml');                                                                  
    24  end;                                                                                                                  
    25  /                                                                                                                      
    PL/SQL procedure successfully completed.
    .

  • Unable to display the Content of a data file from within another data file in Oracle webcenter portal.

    We have a Content Presenter taskflow. This task flow is added to a jspx page. The taskflow fetches the content from the contributor data file. The contributor data file is having a WYSIWYG editor. The content of the WYSIWYG editor is being displayed correctly through the task flow.
    We have some links in the WYSIWYG editor. These links again point to some data files. When we click on these links from within the portal, then we are getting a blank page(the url of this blank page is: http://localhost:7101/eWSIBPortal/faces/oracle/webcenter/sitestructure/render.jspx?datasource=UCM%23dDocName%3AWSIB_ARTICLE) and not displaying the content of the data file that we are pointing to from the WYSIWYG editor.
    We want to display the content of these data files(which we have pointed from WYSIWYG editor) in-line within the portal.
    Please help us to resolve this issue and let us know if any information is required from our end.

    Thanks for reply. However, can I use XSQL to dump the formated text to a file? or just can display to client through web browsers?

  • Read specified content of a xml file

    How to get specified part of a xml file
    This is the content of the xml file, I just want the content in the <body>...</body> without the <p></p> tag. How can I do that?
    <?xml version="1.0" encoding="UTF-8"?>
    <TEI.2>
    <teiHeader>
    <fileDesc>
    <titleStmt>
    <title>Pastikan kita terus bebas -- PM: Kekalkan perpaduan, jangan terpengaruh dakyah asing di alaf baru
    </title>
    <author>MOHD. NOR AB. SAMAD
    </author>
    </titleStmt>
    <publicationStmt>
    <publisher/>
    </publicationStmt>
    <sourceDesc>
    <!-- ... -->
    </sourceDesc>
    </fileDesc>
    <profileDesc>
    <textClass>
    <catRef target="Muka_Hadapan"/>
    </textClass>
    </profileDesc>
    </teiHeader>
    <text>
    <front>
    <!--
                      front matter ...
                 -->
    </front>
    <body>
    <p>- Datuk Seri Dr. Mahathir Mohamad mengajak rakyat supaya mengekalkan perpaduan dan belajar daripada sejarah negara serta tidak terpedaya dengan dakyah asing bagi memastikan Malaysia terus bebas, merdeka dan maju pada alaf akan datang.</p>
    <p>Sambil mengingatkan mereka usaha menjajah semula negara masih diteruskan oleh bekas penjajah, Perdana Menteri berkata, kemerdekaan negara tidak akan kekal selama-lamanya jika rakyat mengabaikan perkara tersebut.</p>
    <p/>
    <p/>
    <p/>
    </body>
    <back>
    <!--
                      back matter ...
                 -->
    </back>
    </text>
    </TEI.2>

    I can get the first <p> tag only. How to get others <p> tag content?
    How I know how many <p> node that it have if i use while loop?
         public static String ParserWord(String pathname, String tag) {
                Text result = null;
                try{
                  DOMParser parser = new DOMParser();
                    parser.parse(pathname);
                    Document doc = parser.getDocument();
                    NodeList doubles = doc.getElementsByTagName(tag);
                    Node datum = doubles.item(0);
                    result = (Text) datum.getFirstChild();
                 catch (Exception e) {
                  System.err.println(e + "cannot parse");
             return result.getNodeValue();
           }

  • How to update XML file from the program

    i am new in abap , and i have the following issue,so plz anyone who knows how to do it
    Background :
    An XML file is used as the datasource for a Flex Application. From time to time this requires updating with new staff details.
    i have already saved the xml file in the c drive with the name C:\AdvAC\AC1\bin-debug\assets\staff
    Requirement :  Write a Dialog transaction with the following text input fields.
    Reference Indicator.     (Char10)
    Staff No          (NUMC, Length 5)
    Name               (Char50)
    Room               (Numc, length 3)
    Phone               (Numc Length 7)
    Mail               (char30)
    in screen 100
    The transaction should also have an u201CUpdate Fileu201D button, which when pressed :
    1) Loads the file C:\AdvAC\AC1\bin-debug\assets \ into an ITAB.
    2) Inserts the data into the ITAB using the following XML format.
    <staff>
    <ref_ind> Reference Indicator.</ref_ind>
    <staff_no> Staff No </staff_no>
    <name> Name </name>
    <room> Room </room>
    <phone> Phone </phone>
    <mail> Mail </mail>
    </staff>
    all should be inside  <allstaff> </allstaff> tagsu2026.
    Writes the ITAB back to the file.
    thanx all

    this is what i have done but i dont know how to do the rest. i will apprecite any help from u.
    Edited by: man700s on Feb 16, 2010 6:58 AM
    REPORT  Z_XML_FILE_UPDATE.
    TYPES: BEGIN OF ts_staff,
             REF_IND(10)  TYPE c,
             Staff_No(5)  TYPE c,
             Name(50)     TYPE c,
             Room(3)      Type n,
             Phone(7)     Type n,
             Mail(30)     Type c,
           END OF ts_staff.
    DATA: t_staff TYPE TABLE OF ts_staff WITH HEADER LINE.
    DATA: w_staff Type ts_staff.
    DATA T_STRING TYPE TABLE OF STRING.
    DATA W_STRING TYPE STRING.
    call SCREEN 100.
    PERFORM upload_xml_file.
    PERFORM update_xml_tab.
    *PERFORM download_xml_file.
    MODULE USER_COMMAND_0100 INPUT.
    W_STRING = '<allstaff>'.
      APPEND w_string to t_string.
      loop at t_staff into w_staff.
      w_string ='<staff>'.
      APPEND w_string to t_string.
      if T_staff-Ref_Ind = 'X'.
      CONCATENATE '<Ref_Ind>' w_staff-Ref_Ind '</Ref_Ind>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-staff_no = 'X'.
      CONCATENATE '<staff_no>' w_staff-staff_no '</staff_no>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-name = 'X'.
      CONCATENATE '<name>' w_staff-name '</name>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
    if T_staff-room = 'X'.
      CONCATENATE '<room>' w_staff-room '</room>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-phone = 'X'.
      CONCATENATE '<phone>' w_staff-phone '</phone>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      if T_staff-mail = 'X'.
      CONCATENATE '<mail>' w_staff-mail '</mail>' into w_string.
      APPEND w_string to t_string.
      ENDIF.
      w_string = '</staff>'.
      append w_string to t_string.
    ENDLOOP.
      W_STRING = '</allstaff>'.
      APPEND w_string to t_string.
    ENDMODULE.               
    Edited by: man700s on Feb 16, 2010 7:01 AM

  • How do you get an xml file from the PO Output for Communication report?

    Can anyone tell me how you've created an xml output fil for this program? When I run it, the View XML button doesn't light up, and the output file is empty.
    I can see the XML when I click the View Log button, but can't figure out how to save it so that the XMLP Desktop tool can load it properly.
    If you can tell me how to create this file, I'd be very appreciative.

    Hi,
    I can't see the xml in my log file. Maybe you have a different logging level. One issue I have had before is that the xml declaration had a strange character encoding. It should say something like: <?xml version="1.0" ?>. If it mentions anything about encoding you can remove it.
    One of our developers wrote a custom process to write the xml to a table when the document was generated as we couldn't find any other way of doing it.
    You can use the sample xml available from the data definition but this is missing fields.
    Probably not much help...
    Paul

  • Trying to read an XML file from the resources

    Hi,
    I am having a problem reading a file from the resources: In my project I have data.xml in my project resources folder. I tried the following and it does not work:
    File xsltFile = new File("resources/data.xml");
    or
    File xsltFile = new File("/resources/data.xml");
    Anybody could help please.
    Rgrds.

    Hi,
    I have tried the following and it does not work:
    URL url = this.getExternalContext().getResource("/resources/displayPassengers.xsl");
    File xsltFile = new File( url.getFile());
    However, the url object has the following properties:
    url.getPath() = "/server/benchmark/resources/displayPassengers.xsl";
    url.getFile() = "/server/benchmark/resources/displayPassengers.xsl";
    but I still can not read the xsltFile. The code are on the prerender() method of the page.
    Please let me know.
    Rgrds.

  • How to create a xml file from the jsp page?

    I'm a beginner of the develop xml,my question like this,
    there has a jsp page,some parameters in it,I wanna get the parameters and create a xml file,so,what parser method should I use?
    And how to create a new xml file,when the file haven't exist at first?
    pls give some code,thanks.

    a ggod link for u http://www.theserverside.com/resources/article.jsp?l=JSP-XML2

  • Creating an xml file from the Basic java Object

    how to create an XML file using the values available in the object with reference to an xsd or dtd file..
    (OR )
    is it possible to write the contents of an object to an xml file without knowing the dtd or xsd file .......

    how to create an XML file using the values available in the object with reference to an xsd or dtd file..
    (OR )
    is it possible to write the contents of an object to an xml file without knowing the dtd or xsd file .......

  • Error while extracting XML file from the application server

    Hi ,
    I am writing a XML file into the application server, after which when i try to extract the file to the local server using the report - RFASLDPC ,
    the file is extracted, but with a '#' symbol at the first position.
    Because of which the XML File does not open. But after i open the file in notepad and manually delete the '#' symbol and then reopen the file, it works fine.
    Is there any way to remove the '#' symbol while extracting itself ??
    Thanks in advance,
    Vikas.

    Select the option "No Character Set Conversion" in stead of Code page 1100.
    However, I still have troubles -> the downloaded xml file misses a space on several places. This causes errors too.

  • We are buying a Mac, will the Apple Store transfer our files from the PC to the new Mac? Also, will the Apple store install Microsoft Office when we purchase it?

    We are buying a Mac.
    1- Will the Apple Store transfer the files from the PC to the Mac?
    2- Will the Apple Store install Microsoft knowing we have to purchase it first.

    Will the Apple Store transfer the files from the PC to the Mac? Yes
    Will the Apple Store install Microsoft Office for Mac 2011? Yes

Maybe you are looking for

  • How do I install Tiger on a G3 iMac via Firewire?

    I want to install Tiger on to my slot loading (CD drive) iMac, via my DVD drive-equipped Powerbook and Firewire. But how do I put both computers in Firewire 'target mode' to do this?

  • Airdrop on mid 2009's macbook pro

    Hello All, I have a mid 2009 macbook pro and i recently installed the latest OS, Yosemite. based on what i have just read on one of the Apple support sites, that almost the late 2008 macbook pro's are supporting the Airdrop. infact i have the icon on

  • Bug 4414439 in Mustang or not?

    http://java.sun.com/developer/technicalArticles/J2SE/Desktop/mustang/ gives the impression that http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4414439 will be fixed in Mustang, but the last entry in the bug's Evaluation section (dated 4/05) says,

  • In Production system Infocube mange screen selection changed

    Dear Experts, I have problem with my production system. Problem:In Prod system for all the Infocube settings has changed may yesterday because of that we are not able to see in the manage screen Tranferred and Added records colums. Could you please s

  • In firefox re bank transaction it will not let me put my security in drop down box yet will in internet

    Hi When i Bank or Book a holiday online the web site goes through certain checks at the finish the bank requests a 3 fig security check eg s n a with a slide bar at the side to complete though when i am in firefox the slide bar does not appear thus i