How to process an XML file if I don't now it's name before execution time .

Hi All,
I've a problem that some of you may be already covered.
Basically i have to process some XML files (with the same structure) without prior knowledge of their filenames.
The question is, how I've to modify the jdbc url of the XML datastore to use a variable and not an hardcoded filename ?
Example:
At the moment I'm using the following url :jdbc:snps:xml?f=c:/oditest.xml&ro=true&dod=yes
but I would like to replace the hardcoded filename (c:/oditext.xml) with a danamyc variable refreshed at run time.
Thanks a lot for your help
Ben

Hi I've found the solution :
look at
https://s3.amazonaws.com/Ora/XML_7_Reading_a_dynamic_named_xml_file.swf
Thanks to all
Ben

Similar Messages

  • How to get the XML file if we are using the Product short name.

    Hi,
    Till now I have used Short name of the Concurrent Program for Code while creating a Data Definition. Now saw a seeded template which has given the Code by Product short name. If we have the concurrent program then it is easy to refer the fields by checking the XML file. In this case how to find the XML file or how to refer all the fields if we have given code with Product short name. I saw this for iReceivables(ARI). Anybody please help me.
    Thanks.

    Hi Siva
    Just to clarify, rather than the short name of the conc program there is a shipped data definition that just uses the product short name? What is the data def so I can check it.
    Regards, Tim

  • How To Process an XML File

    Hi All
    Clasic ASP
    MySQL
    Win 2K Server
    I have an XML file that is uploaded from clients via a
    browser which
    contains job data. Once uploaded I need to process it into a
    MySQL DB using
    classic ASP.
    The file contains 3 lots of elements under the main job
    element; these are:-
    <job_detail>
    <engineers>
    <materials>
    The upload and save aspect I can do no problem what I need to
    do is read the
    file and process each job detail record, each engineer detail
    record and
    each materials record into a database, something on the lines
    of:-
    Upload file from client
    Save file to disk
    Open XML file
    Select all job records
    Loop through and process job records
    Select all engineer records
    Loop through and process engineer records
    Select all material records
    Loop through and process material records
    How do I select the job detail, engineer and materials
    records, into say an
    array or a recordset for example. (if someone feels there is
    a better way
    then please feel free to suggest.)?
    An example of my XML file is below
    TIA
    Bren
    <?xml version="1.0" ?>
    - <jobs>
    - <job_detail>
    <j_recid>4041</j_recid>
    <j_numofvisits>1</j_numofvisits>
    <j_client>800</j_client>
    <j_site>864</j_site>
    <j_workdone />
    <j_suppliervisit>N</j_suppliervisit>
    <j_furtherwork>N</j_furtherwork>
    <j_returnvisit>N</j_returnvisit>
    <j_furtherworksdesc />
    <j_tobequoted>N</j_tobequoted>
    <j_status>6</j_status>
    <j_enteredby>Yolanda Baker</j_enteredby>
    <j_e_signature>53,29,-1,-1,53,29,53,30,53,30,58,33,58,33,75,45,75,45,110,58,110,58,149,61 ,149,61,176,54,176,54,186,42,186,42,191,33,191,33,192,30,192,30,192,29,192,29,189,29,189,2 9,184,28,184,28,174,29,174,29,159,32,159,32,124,39,124,39,82,46,82,46,54,50,54,50,43,50,43 ,50,38,50,38,50,37,49,37,49,38,49,38,49,39,49,39,49,57,49,57,49,109,54,109,54,180,56,180,5 6,239,54,239,54,277,46,277,46,281,45,281,45,281,44</j_e_signature>
    <j_e_name>Test Engineer</j_e_name>
    <j_e_position>Engineer</j_e_position>
    <j_e_comments />
    <j_e_sigdate>20/11/2008</j_e_sigdate>
    <j_c_signature>54,7,-1,-1,54,7,54,8,54,8,54,10,54,10,57,19,57,19,65,30,65,30,81,46,81,46, 100,58,100,58,121,62,121,62,144,63,144,63,163,57,163,57,181,47,181,47,190,41,190,41,200,36 ,200,36,207,33,207,33,207,31,207,31,201,29,201,29,197,27,197,27,193,27,193,27,184,28,184,2 8,172,31,172,31,160,34,160,34,146,40,146,40,140,43,140,43,138,45,138,45,137,45,137,45,136, 45,136,45,135,46,135,46,131,50,131,50,127,56,127,56,124,58,124,58,124,57,124,57,124,56,124 ,56,132,54,132,54,151,50,151,50,178,44,178,44,204,39,204,39,220,39,220,39,228,40,228,40,23 0,41,230,41,233,44,233,44,237,49,237,49,246,57,246,57,254,60,254,60,263,63,263,63,264,63</ j_c_signature>
    <j_c_name>Mr Blobby</j_c_name>
    <j_c_position>Fat Chap</j_c_position>
    <j_c_comments />
    <j_c_sigdate>20/11/2008</j_c_sigdate>
    <j_qos>3</j_qos>
    <j_notified>N</j_notified>
    <j_processed>N</j_processed>
    <j_active>Y</j_active>
    </job_detail>
    - <job_detail>
    <j_recid>4042</j_recid>
    <j_numofvisits>1</j_numofvisits>
    <j_client>798</j_client>
    <j_site>865</j_site>
    <j_workdone>As per job sheet</j_workdone>
    <j_suppliervisit>N</j_suppliervisit>
    <j_furtherwork>N</j_furtherwork>
    <j_returnvisit>N</j_returnvisit>
    <j_furtherworksdesc />
    <j_tobequoted>N</j_tobequoted>
    <j_status>6</j_status>
    <j_enteredby>Yolanda Baker</j_enteredby>
    <j_e_signature>44,20,-1,-1,44,20,43,20,43,20,42,20,42,20,39,21,39,21,34,25,34,25,28,29,28 ,29,25,32,25,32,22,38,22,38,22,41,22,41,22,43,22,43,22,44,22,44,26,44,26,44,38,45,38,45,64 ,42,64,42,104,36,104,36,135,33,135,33,165,31,165,31,178,31,178,31,185,33,185,33,189,35,189 ,35,192,38,192,38,197,41,197,41,203,43,203,43,211,49,211,49,220,51,220,51,228,52,228,52,23 1,53,231,53,232,49,232,49,233,43,233,43,230,34,230,34,229,31,229,31,224,27,224,27,213,24,2 13,24,195,23,195,23,171,27,171,27,152,32,152,32,141,36,141,36,138,36,138,36,137,37,137,37, 140,38,140,38,157,43,157,43,191,46,191,46,230,48,230,48,242,48</j_e_signature>
    <j_e_name>Test Engineer</j_e_name>
    <j_e_position>Engineer</j_e_position>
    <j_e_comments>Great job</j_e_comments>
    <j_e_sigdate>20/11/2008</j_e_sigdate>
    <j_c_signature>31,13,-1,-1,31,13,31,14,31,14,31,16,31,16,34,23,34,23,36,32,36,32,38,42,38 ,42,42,53,42,53,43,59,43,59,44,60,44,60,44,59,44,59,44,57,44,57,45,52,45,52,50,44,50,44,56 ,38,56,38,64,33,64,33,74,28,74,28,86,23,86,23,98,21,98,21,111,20,111,20,121,20,121,20,123, 20,123,20,123,21,123,21,126,24,126,24,126,27,126,27,130,33,130,33,133,37,133,37,135,42,135 ,42,139,47,139,47,142,51,142,51,144,54,144,54,151,57,151,57,157,57,157,57,164,52,164,52,17 1,46,171,46,180,42,180,42,193,38,193,38,203,38,203,38,215,38,215,38,228,38,228,38,238,39,2 38,39,245,39,245,39,247,39,247,39,248,38</j_c_signature>
    <j_c_name>Mr Blobby 2</j_c_name>
    <j_c_position>Fat Chap 2</j_c_position>
    <j_c_comments>Very well done</j_c_comments>
    <j_c_sigdate>20/11/2008</j_c_sigdate>
    <j_qos>1</j_qos>
    <j_notified>N</j_notified>
    <j_processed>N</j_processed>
    <j_active>Y</j_active>
    </job_detail>
    - <engineers>
    <m_recid>1</m_recid>
    <m_jid>4041</m_jid>
    <m_operative>18</m_operative>
    <m_starttime>07:00</m_starttime>
    <m_finishtime>17:00</m_finishtime>
    <m_traveltime>1</m_traveltime>
    <m_jobdate>20/11/2008</m_jobdate>
    </engineers>
    - <engineers>
    <m_recid>2</m_recid>
    <m_jid>4041</m_jid>
    <m_operative>3</m_operative>
    <m_starttime>07:00</m_starttime>
    <m_finishtime>17:00</m_finishtime>
    <m_traveltime>1</m_traveltime>
    <m_jobdate>20/11/2008</m_jobdate>
    </engineers>
    - <engineers>
    <m_recid>3</m_recid>
    <m_jid>4042</m_jid>
    <m_operative>3</m_operative>
    <m_starttime>07:00</m_starttime>
    <m_finishtime>17:00</m_finishtime>
    <m_traveltime>1</m_traveltime>
    <m_jobdate>20/11/2008</m_jobdate>
    </engineers>
    - <engineers>
    <m_recid>4</m_recid>
    <m_jid>4042</m_jid>
    <m_operative>25</m_operative>
    <m_starttime>09:00</m_starttime>
    <m_finishtime>17:00</m_finishtime>
    <m_traveltime>1</m_traveltime>
    <m_jobdate>20/11/2008</m_jobdate>
    </engineers>
    - <engineers>
    <m_recid>5</m_recid>
    <m_jid>4042</m_jid>
    <m_operative>8</m_operative>
    <m_starttime>07:00</m_starttime>
    <m_finishtime>17:00</m_finishtime>
    <m_traveltime>1</m_traveltime>
    <m_jobdate>20/11/2008</m_jobdate>
    </engineers>
    - <materials>
    <mu_recid>1</mu_recid>
    <mu_jid>4041</mu_jid>
    <mu_qty>1</mu_qty>
    <mu_description>Widget</mu_description>
    <mu_location>Van</mu_location>
    </materials>
    - <materials>
    <mu_recid>2</mu_recid>
    <mu_jid>4042</mu_jid>
    <mu_qty>20</mu_qty>
    <mu_description>2.5 T & E</mu_description>
    <mu_location>Van</mu_location>
    </materials>
    </jobs>

    And there was much rejoiceing Yayyy! :-)
    I have sorted it, if anyone is interested then see my code
    below. The code
    below writes to the screen for testing purposes. To insert
    into a DB then
    just build your SQL statement and Insert or Update DB as you
    would normally
    instead of writing to screen.
    Code
    <%
    Dim objXML
    Set objXML = Server.CreateObject("Microsoft.XMLDOM")
    objXML.async = False
    objXML.load
    (Server.MapPath("/mwsclient/files/upload/Test_Engineer.xml"))
    If objXML.parseerror.errorCode <> 0 Then
    Response.Write(objXML.parseError.reason)
    Else
    Set objNodeList =
    objXML.documentElement.selectNodes("job_detail")
    For i = 0 To (objNodeList.length - 1)
    Response.Write("JOB RECORD<br>")
    For x = 0 To (objNodeList.Item(i).childNodes.length - 1)
    Response.Write(objNodeList.Item(i).childNodes(x).nodeName
    Response.Write(objNodeList.Item(i).childNodes(x).xml &
    "<br>")
    Next
    Response.Write("<br>")
    Next
    End If
    Set objXML = Nothing
    %>
    Output:
    JOB RECORD
    j_recid - 4041
    j_numofvisits - 1
    j_client - 800
    j_site - 864
    j_workdone -
    j_suppliervisit - N
    j_furtherwork - N
    j_returnvisit - N
    j_furtherworksdesc -
    j_tobequoted - N
    j_status - 6
    j_enteredby - Yolanda Baker
    j_e_signature - 44
    j_e_name - Test Engineer
    j_e_position - Engineer
    j_e_comments -
    j_e_sigdate - 20/11/2008
    j_c_signature - 63
    j_c_name - Mr Blobby
    j_c_position - Fat Chap
    j_c_comments -
    j_c_sigdate - 20/11/2008
    j_qos - 3
    j_notified - N
    j_processed - N
    j_active - Y
    JOB RECORD
    j_recid - 4042
    j_numofvisits - 1
    j_client - 798
    j_site - 865
    j_workdone - As per job sheet
    j_suppliervisit - N
    j_furtherwork - N
    j_returnvisit - N
    j_furtherworksdesc -
    j_tobequoted - N
    j_status - 6
    j_enteredby - Yolanda Baker
    j_e_signature - 48
    j_e_name - Test Engineer
    j_e_position - Engineer
    j_e_comments - Great job
    j_e_sigdate - 20/11/2008
    j_c_signature - 38
    j_c_name - Mr Blobby 2
    j_c_position - Fat Chap 2
    j_c_comments - Very well done
    j_c_sigdate - 20/11/2008
    j_qos - 1
    j_notified - N
    j_processed - N
    j_active - Y

  • How to Merge multiple XML  files in one file ( Env: XML Publisher 5.6.2)

    All,
    I have recently started working on XML publisher and have developed 3 reports in last 2 days using XML Publisher and integrating them with Concurrent programs.
    This is a great tool.
    I have got another requirement, where i need to use xml file generated by multiple run of same report with various parameters and then merge all xml file to a single report. Developing the whole custom process will take very long time and sure will have bugs in it. Instead i was thinking to use xml file generated by Oracle report itself.
    Report "US Gross to net summary" generates xml output in standard output directory and then show output in PDF file. I have 7 such file generated for each payroll. I want to merge output of xml into a single xml so that i can create single report having data from all 7 xml files showing me All payroll output in a single report.
    Can someone please guide me , how can i read xml file data from the output directory of a seeded concurrent program and how to manipulate data in it.
    Thanks
    Ankur

    Hi Tim,
    Thanks for replying. I have looked for "PDFBookBinder class" in xml publisher user guide for ver 5.6.2. I didn't get any reference of this text. Can you please guide me to a tutorial/link where i can get more information about this class.
    Also, i originally thought of similar to your second logic, as my design basis. Oracle process generates the xml file in output directory which i can get. What i didn't get is how do i "pick them up and merge" using publisher. Also, is there way to do this merging process using pl/sql ? Can you please give little more information on your second approach.
    My original plan of action is that i will create a report set in which i will call oracle seeded report for all 7 payrolls in a sequential manner. Then using the child requests of the report set i will get to 7 xml files generated by seeded oracle process. Then the piece i am not sure of , i will use those 7 files to generate a single xml file having payroll name as tree top for each output. Once single xml is ready, i can easily design a template and register the process to generate output as Excel.This process will not require me to actually change any data or do any calculation. It will only reformatting the feilds we see and abiity to see all 7 payroll at one time rather then entering these numbers manually into an excel to do analysis.
    Please provide your feedback, if you think above plan is not feasible or need corrections.
    Best Regards,
    Ankur

  • How to transfer a xml file?

    Dear friends,
    I have a question about how to transfer a xml file between server and client using axis or weblogic.
    My application needs to send xml files instead of primitive data types and bean objects.
    Is it possible to tranfer files between server and client?
    thank you very much for your great help!
    jayanandan.

    hi,
    There are two ways in which u can send an xml file.
    1) U send it along with the body of the soap message.
    2)u can send it as an attachment in the soap envelope. this method u can use for any type of files.
    If u send it in soap body the it will take more time for the processing of the soap body.so attachment is the best way.
    I case of any queries please feel free to post it in the forum
    Regards
    Sandy

  • How to upload a XML file to Servlet

    Hi,
    I am new to Java, I have to upload an XML file to java/j2ee server. The web server running on the server is "Tomcat 4.1". My new requirement is I have to upload an "Input.XML" file, can you please tell me how to upload an XML file. If any samples appriciated very soon.
    Thanks & Regards,

    Hi!
    On the client side, the client's browser must support form-based upload. Most modern browsers do, but there's no guarantee. For example,
    <FORM ENCTYPE='multipart/form-data'
    method='POST' action='/myservlet'>
    <INPUT TYPE='file' NAME='mptest'>
    <INPUT TYPE='submit' VALUE='upload'>
    </FORM>
    The input type &quot;file&quot; brings up a button for a file select box on the browser together with a text field that takes the file name once selected. The servlet can use the GET method parameters to decide what to do with the upload while the POST body of the request contains the file data to parse.
    When the user clicks the "Upload" button, the client browser locates the local file and sends it using HTTP POST, encoded using the MIME-type multipart/form-data. When it reaches your servlet, your servlet must process the POST data in order to extract the encoded file. You can learn all about this format in RFC 1867.
    Unfortunately, there is no method in the Servlet API to do this. Fortunately, there are a number of libraries available that do. Some of these assume that you will be writing the file to disk; others return the data as an InputStream.
    You can see more things about Servlet on this website [http://pedrofao.blogspot.com|http://pedrofao.blogspot.com].

  • Initiate to process the xml file

    Dear Experts,
         I have a requirement to initiate to process of .xml file when .txt file is available in FTP folder,If the .xml file alone in that FTP folder no need to process or pick the xml file from sender side.
    Scenerio is File(xml)->PI->RFC.
    Is there any option in PI 7.1.kindly guide how to acheive this.
    Best Regards,
    Monikandan

    We have this option for NFS protocol but i don't think FTP has got it yet though the idea is submitted in idea forum.
    Q4 :http://wiki.scn.sap.com/wiki/display/XI/Sender+File+Adapter+Frequently+Asked+Questions
    I think you have to count on executing OS commands feature..,

  • Processing large xml file (500mb)? break into small part? load into jtree

    hi,
    i'm doing an assignment to processing large xml file (500mb) and
    load into jree using JAVA.
    can someone advice me on the algorithm to do this?
    how can i load a 500mb xml in a jtree without system hang?
    how to i break my file and do the loading?

    1 Is the file schema based binary XML.
    2. The limits are dependant on storage model and chacater set.
    3. For all NON-XML content the current limit is 4GBytes (Where that is bytes not characters). So for Character content in an AL32UTF8 database the limit is 2GB
    4. For XML Content stored as CLOB the limit is the same as for character data (2GB/4GB) dependant on database character set.
    5. For SB Based XML content stored in Object Relatioanl storage the limit is determined by the complexity and structures defiend in the XML Schema

  • Hi friends, how to process a text file.?

    1)how to process a text file.?

    Hi Ganga,
    Use following scenarios:-
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/srinivas.vanamala2/blog/2007/02/05/step-by-step-guide-xml-file-2-xml-file-scenario-part-ii
    /people/srinivas.vanamala2/blog/2007/02/05/step-by-step-guide-xml-file-2-xml-file-scenario-part-i
    /people/divya.vidyanandanprabhu/blog/2005/06/28/converting-xml-to-pdf-using-xi
    /people/venugopalarao.immadisetty/blog/2007/01/24/troubleshooting-file-to-idoc-scenario-in-xi
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    Vishal
    Reward points for useful reply

  • 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

  • How to load an XML file to oracle9i server?

    I want to use XSU DBMS_XMLsave package to load an XML file to a relational table using PL/SQL from a distant server. Now, I don't know how to load that XML file to the distant server.
    Somebody help me?

    I want to use XSU DBMS_XMLsave package to load an XML file to a relational table using PL/SQL from a distant server. Now, I don't know how to load that XML file to the distant server.
    Somebody help me?

  • Does anyone know how to convert an XML file to a readable file?

    All,
    I have been using an APP called "SMS Backup & Restore" to backup my message conversations to my Laptop PC.  It works fine BUT the backup file, once in my PC, has an XML extent such as "filename.XML"
    I would like to read and/or print and/or save the text message file so does anyone know how to convert the XML file to something else so it shows all the messages without all the formatting instructions.   
    When I try to see the XML file it shows all the formatting.  If I replace the .XML with .TXT that too shows all the formatting mixed in with the text message narrative.
    When I look at the XML file in SMS Backup & Restore in the Charge phone it looks great showing all the messages just as they were on the phones display.  The problem with this is that there is no way to print or read or save the messages as they appear in the file from the phone itself.  I tried screen capture but if you have, let's say, a 28 message conversation you have to do 7 or 8 screen captures to get them all.
    If only I could convert the XML in my PC to something that is printable or savable or readable that would be the "cats meow."
    Anyone know how???
    JerryF
    PS, You might take a look at my related post.
    https://community.verizonwireless.com/message/809832#809832

    Ann154,
    You were correct again.  I deleted everything I had done to date and re-did the entire SMS backup of my 28 message conversation again and YES I was able to open it using IE-8.  It looks great and it prints great and life is good!  I am going to go make a donation.
    Thanks again for the help.  I marked this thread as answered by you.
    JerryF

  • How to create new XML file using retreived XML content by using SAX API?

    hi all,
    * How to create new XML file using retreived XML content by using SAX ?
    * I have tried my level best, but output is coming invalid format, my code is follows,
    XMLFileParser.java class :-
    import java.io.StringReader;
    import java.io.StringWriter;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.XMLFilterImpl;
    public class PdfParser extends XMLFilterImpl {
        private TransformerHandler handler;
        Document meta_data;
        private StringWriter meta_data_text = new StringWriter();
        public void startDocument() throws SAXException {
        void startValidation() throws SAXException {
            StreamResult streamResult = new StreamResult(meta_data_text);
            SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try
                handler = factory.newTransformerHandler();
                Transformer transformer = handler.getTransformer();
                transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                handler.setResult(streamResult);
                handler.startDocument();
            catch (TransformerConfigurationException tce)
                System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
            super.startDocument();
        public void startElement(String namespaceURI, String localName,
                String qualifiedName, Attributes atts) throws SAXException {
            handler.startElement(namespaceURI, localName, qualifiedName, atts);
            super.startElement(namespaceURI, localName, qualifiedName, atts);
        public void characters(char[] text, int start, int length)
                throws SAXException {
            handler.characters(text, start, length);
            super.characters(text, start, length);
        public void endElement(String namespaceURI, String localName,
                String qualifiedName) throws SAXException {
            super.endElement("", localName, qualifiedName);
            handler.endElement("", localName, qualifiedName);
        public void endDocument() throws SAXException {
        void endValidation() throws SAXException {
            handler.endDocument();
            try {
                TransformerFactory transfactory = TransformerFactory.newInstance();
                Transformer trans = transfactory.newTransformer();
                SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
                DOMResult dom_result = new DOMResult();
                trans.transform(sax_source, dom_result);
                meta_data = (Document) dom_result.getNode();
                System.out.println(meta_data_text);
            catch (TransformerConfigurationException tce) {
                System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
            catch (TransformerException te) {
                System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
    } CreateXMLFile.java class :-
    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();
    Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
    class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
    * In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
    is not an XML type text, it just an Normal text Why that ?
    * Please help me what is the problem in my code?
    Cheers,
    JavaImran

    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    </code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
    <code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();     
    * I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
    * I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
    Thanks,
    JavaImran{code}

  • How to transfer an xml file to NW Portal Knowledge Management from XI?

    Hi all,
    Anybody knows how to transfer an xml file to NW Portal Knowledge Management from XI?
    What kind of adapter type I have to choose? And which procedures I have to do in KM Portal? Create a folder, what kind of folder and permissions?
    Suggestions and ideas are appreciated.
    Thanks in advance,
    Ricardo.

    Hi
    Can anyone tell me how XI sends messages to applications like J2EE. In REceiver comm channel, I think we specify about the target system like J2EE appl.
    Aadapter Type: HTTP
                   Receiver
    Transport Protocol:  HTTP1.0
    Message Protocol:    XI payload in HTTP body
    Adapter Engine:      Integration Server
    Addressing Type:     URL address
    Target host:         localhost
    Service Number:      7001(Port number of Weblogic appl server--where my J2EE appl is deployed).
    Path     :  /Invoke/DisplayRes/
    Authentication Type:Use Logon Data for SAP System
    Content Type: text/xml
    Username:   xiappluser
    password:   xx
    XML code:   UTF-8
    I suppose XI sends msgs to http://localhost:7001/Invoke/DisplayRes/........
    in this example if am correct?
    Then I have given all tyhe necessary setting but my servlet is not able to display XML msg in browser?
    This is my servlet code:
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
         PrintWriter out = response.getWriter();
         BufferedReader brin =new BufferedReader(new InputStreamReader(request.getInputStream()));
         String inputLine;
         StringBuffer sBuf = new StringBuffer();
            response.setContentType("text/xml");
         while ((inputLine = brin.readLine()) != null)
             sBuf.append(inputLine);
             out.println("hi");            
                out.println(sBuf.toString());
             brin.close();
             out.flush();
    What went wrong?
    Help me, all helpful answers are highly rewarded.
    Thanks

  • How to read an xml file from headers

    Hi ,
    I am not getting how to read an xml file sent by client device in header to server.
    Thankx.

    There is a getHeader() in HttpServletRequest interface
    String locationURL=request.getHeader("Location");If URL of your file was set in Location attribute of header.
    Edited by: ngpgeeta on Dec 19, 2008 8:03 AM

Maybe you are looking for