How should convert text file into XML file?

I do a project "WEB SERVER LOG ANALYZER" using JSP. For that i copy the content of log file into the other file . how i convert it into XML file . xplain with coding

Read this [page.|http://www.devx.com/getHelpOn/10MinuteSolution/20356]

Similar Messages

  • How to convert database table into xml file

    Hi.
    How to convert database table into XML file in Oracle HTML DB.
    Please let me know.
    Thanks.

    This not really a specific APEX question... but I search the database forum and found this thread which I think will help
    Exporting Oracle table to XML
    If it does not I suggest looking at the database forum or have a look at this document on using the XML toolkit
    http://download-east.oracle.com/docs/html/B12146_01/c_xml.htm
    Hope this helps
    Chris

  • How to convert a string into xml file

    Hi,
    i have a string . the string contain fully formated xml data. i mean my string like below
    <?xml version="1.0"?>
    <PARTS>
       <TITLE>Computer Parts</TITLE>
       <PART>
          <ITEM>Motherboard</ITEM>
          <MANUFACTURER>ASUS</MANUFACTURER>
          <MODEL>P3B-F</MODEL>
          <COST> 123.00</COST>
       </PART>
       <PART>
    ......................i want to convert it into an xml file
    can u help me?
    thank u

    Thank you Paul Clapham,
    and sorry ..
    i have some other doubt.. regarding xml
    i want to post an XML file from one server(Server_1) to other server.(Server_2)
    To generate an xml file i used DOM in Server_1.
    using xml.transform , StringWriter i converted it into String.
    I post the string to another server and there i will parse it.
    for that i write the code like below in servlet in server_1
    <form name=fn action=http://localhost:8080/server_2/parseXMl.do method=post>
    <input type=hidden name=xmlFile value="+Xmlstring+">
    <input type=submit >is this process is correct?
    Some of the turorial told that use web-services/XML-RPC
    but i new to both..
    I want to complete it using my knowledge only/
    Is it possible to do it?
    Or any other alternative?
    can help me?

  • How can convert HTML file into xml file?

    Hi,
    I am receving one HTML file as an input and i want to convert that receiving(html file) into .xml file.Is there any converter (tools)to do this.Pls if any give me the details with regard.
    Regards,
    mahesh.

    Use the HTMLEditorKit to parse the html file.
    this kit is having the callback methods which
    are called wenever the tag appears in the HTML
    stream.

  • How to convert Xls file into Xml file

    Hi,
    I am trying to convert Xls file into Xml  but there  is no any direct procedure for it
    Pls help me out to convert Xls file into Xml file
    Thanks
    Anushree

    you will require to write a module in your file adapter for the same.
    ref: /people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter as mentioned in the earlier post.
    Else you can also use Conversion Agent to read the same.
    Ref: http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/content.htm

  • Conversion of xls file into xml file

    Hi,
    i want to convert xls file into xml
    pls let me know the procedure for it
    Thanks

    Hi Anu,
    U can use FM <b>SAP_CONVERT_TO_XML_FORMAT</b> to convert data to XML.
    Or u can use some threads related to this FM. So that u can get better idea about this.
    Check this link also
    conversion of xls file into xml file
    regards,
    raghu

  • How to convert Java Objects into xml?

    Hello Java Gurus
    how to convert Java Objects into xml? i heard xstream can be use for that but i am looking something which is good in performance.
    really need your help guys.
    thanks in advance.

    There are apparently a variety of Java/XML bindings. Try Google.
    And don't be so demanding.

  • How to convert text file into xml file format with and check that with DTD

    I have an text file with | seperator . I have to convert this to an xml file and check with DTD present with me..
    plz help me out

    can i get some code that how to compare the xml with dtd or just give the DTD name with an XML

  • How to convert .stl file into .xml file. Subtitles to IMPORT INTO FCPro

    I have a subtitles file which was created in dvd studio pro. I exported that file and made a .stl file (which can be opened with TextEdit).
    I need to import that file into FCP to then make a quicktime file w/subs to be exported.
    I'm trying to use TitleExchange which tells you you CAN convert .stl files into .xml (FCPro type of file) but when I try to import the .stl subtitle file into TitleExchange to be converted to .xml I get the following error:
    Can't make "" into type boolean. (-1700)
    Can someone help?
    Thanks!!!
    Paula

    Can anyone help me?
    I absolutely need to import the subtitles into Final Cut and re-writing all of them manually would take forever.
    Please let me know if there is any program I need to use.
    Thanks for all tips
    Paula

  • How to convert DOM Tree in XML File

    Hi there,
    I am successful to build a DOM tree in memory where i am adding elements. Now after all this i want to make a XML file of that DOM representation. Now, i am confused with my code that how to transfer DOM structure to xml file ? A small code is attached herewith ?
    doc = db.newDocument();
                   doc.normalizeDocument();
                   doc.setXmlVersion("1.0");
                   doc.createComment("Created By: Sachin Kulkarni");
                   Element rn = doc.createElement("RootNode");
                   Element n1 = doc.createElement("A1");
                   ((Node)n1).setNodeValue("Element A1");
                   Element n11 = doc.createElement("A11");
                   ((Node)n11).setNodeValue("Element A11");
                   Element n12 = doc.createElement("A12");
                   ((Node)n12).setNodeValue("Element A12");
                   ((Node)n1).appendChild( ((Node)n11) );
                   ((Node)n1).appendChild( ((Node)n12) );
                   Element n2 = doc.createElement("A2");
                   ((Node)n2).setNodeValue("Element A2");
                   Element n3 = doc.createElement("A3");
                   ((Node)n3).setNodeValue("Element A3");
                   ((Node)rn).appendChild( ((Node)n1) );
                   ((Node)rn).appendChild( ((Node)n2) );
                   ((Node)rn).appendChild( ((Node)n3) );
    //creating the xml file
                   Source source = new DOMSource((Element) doc.getElementsByTagName("RootNode").item(0));
                   StringWriter out = new StringWriter();
                   StreamResult result = new StreamResult(out);
                   Transformer transformer = TransformerFactory.newInstance().newTransformer();
                   transformer.setOutputProperty("encoding", "iso-8859-1");
                   transformer.setOutputProperty("indent", "yes");
                   //transformer.setOutputProperty("test.xml","1");
                   //transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
                   transformer.transform(source,result);
                   result.getWriter().toString();
    ==================
    Is it any problem with the implementation ? How to use fileoutputstream with this ?

    I have done like this:
    DocumentBuilderFactory docBuildFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = docBuildFactory.newDocumentBuilder();
    Document doc = builder.newDocument();
    Element root = (Element)doc.createElement("Root");
    doc.appendChild(root);
    Element address = (Element)doc.createElement("Address");
    address.appendChild((Element)doc.createElement("Street"));
    address.appendChild((Element)doc.createElement("PostCode"));
    address.appendChild((Element)doc.createElement("Town"));
    Element country = (Element)doc.createElement("Country");
    country.setAttribute("type","EU");
    Text cname = doc.createTextNode("Spain");
    country.appendChild(cname);
    address.appendChild(country);
    root.appendChild(address);
    TransformerFactory tranFactory = TransformerFactory.newInstance();
    Transformer aTransformer = tranFactory.newTransformer();
    aTransformer.setOutputProperty(OutputKeys.INDENT, "yes");
    Source src = new DOMSource(doc);
    Result dest = new StreamResult(new FileOutputStream(new File("test.xml")));
    aTransformer.transform(src, dest);

  • How to SaveAs the MSword file into xml file format using Java APIS?

    Hello all,
    I want to convert MSword file into Xml format using java APIS or any other inbuilt APIS that i can integrate in Java code.

    Sorry, that doesn't make much sense.
    The XML you gave is a configuration file for txt2xml utility. It doesn't represent the output format.
    Are you a user of this utility?

  • How to convert alv list into excel file?

    Hi Experts,
            i have created one report for Due Date Analysis.
    Now My output is displaying in ALV list. But I need to convert the data which in alv list into Excel File. then only i have to send the Excel File to the Customer Thro Email.
         So i need the Function Module to Convert the Data into Excel File.
    Thanks,
    Neptune.M

    Hi,
      U can use function module gui_download.
      CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
        BIN_FILESIZE       =
          filename           = 'C:\Transportaionlane.XLS'
          filetype                       = 'DAT'
        WRITE_FIELD_SEPARATOR           = ' '
        HEADER                          = '00'
        TABLES
          ata_tab                       = t_trans_lane_dis[]
           OTHERS                          = 22
    if u want with header then pass the header.
    regards
    Ahasan

  • How to convert Java string into XML one?

    With SAX I can parse an xml file, but I should create xml file by hands.
    Ok, it's simple, but how to encode java string into XML constant
    like "Hello & goodby" into "Hello & goodby" ?
    Is there a standard method for such special xml characters?

    If you are creating your XML "by hand" then just make sure your hands know that you have to do that. It isn't difficult to write a Java method to do it, if "by hand" means "in Java code". Otherwise your XML is not well-formed. And as far as I know there is no package that takes ill-formed XML and fixes it up.

  • How to convert text file into xml file

    Hi Folks,
    I am genarating list of data into text file, but i want to genarate xml file for this text file. How to achive this , please let me know. Thanks.
    regards
    Vishal

    hi Vishal,
      Use<b> GUI_DOWNLOAD</b> FM and give the file name as <b>file.xml</b> with BIN Mode....
    i.e,
      Download internal table to presentation server file(PC)
      DATA: ld_filename TYPE string value <b>file.xml</b>,
    Pre version 4.7 declaration e_file like rlgrap-filename.
      DATA: begin of it_datatab occurs 0,
      row(500) type c,
    end of it_datatab.
      call function 'GUI_DOWNLOAD'
           exporting
                filename         = ld_filename
                <b>filetype         = 'BIN'</b>
           tables
                data_tab         = it_datatab[]
           exceptions
                file_open_error  = 1
                file_write_error = 2
                others           = 3.
    Regards,
    Santosh

  • How to convert excel file into xml file

    Friends
    Will you please help me out becz i am daily getting excel file from SAP which i have to translate into the xml file.
    Waiting for ur reply.
    Hitesh

    Depends on how your excel document looks like and what you wish to accomplish.
    First, save the excel file as a tab or comma separated file.
    Create a program that reads the lines of the file, and just print the cell content into the right xml tags.
    E.g.
    Street Name
    Main st 3 Wild Bill
    Main st 2 Crazy Bill
    could be translated into an xml:
    <Adress>
    <Street>Main st 3</Street>
    <Name>Wild Bill</Name>
    </Adress>
    <Adress>
    <Street>Main st 2</Street>
    <Name>Crazy Bill</Name>
    </Adress>
    or:
    <header>
    <col>Street</col>
    <col>Name</col>
    </header>
    <row>
    <col>Main st 3</col>
    <col>Wild Bill</col>
    </row>
    <row>
    <col>Main st 2</col>
    <col>Crazy Bill</col>
    </row>
    etc
    E.g. using the code
    String[] lineColumns=...
    while(lineColumns!=null){
      println("<row>");
      for(int i=0; i<lineColumns.length; i++){
        println("<col>"+lineColumns[i]+"</col>");
      println("</row>");
      ...Gil

Maybe you are looking for

  • Bug or Feature? (regarding JAXB)

    Hello, there seems to be a problem when generating interfaces with JAXB. All types in the interface are String, even though they have been specified otherwise in the binding scheme (like: <element name="Person" type="class" /> ). The generated interf

  • COPA Report: Multiple selection

    Hi Gurus, I want to have a profit center as a multiple selection to be given as an input in KE30 report. That means user should be able to execute the report based on the selection of the profit center in the entry screen For the same I created a glo

  • Butons to close together

    I created a flash website everthing works as it should except for i have some buttons to close to each other that the "closer button" i created to close out of the dropdown is not being read because the button next to it is overlapping. Is there a wa

  • How do I edit authorized computers on my apple id account?

    I just put a new logic board in my Macbook pro and when syncing my iphone I was notified that I have now 4 computers of the 5 allowed, authorized on my apple id account.  I have 2 macbook pros (mine and my wifes) and I have a mac pro tower.  I'd like

  • HT201385 Organise iOS iCloud folders by subject instead of by app

    Like most people I don't organise files by app but by subject e.g. 'Customer A' Pages documents should be in a 'Work/Customers/Customer A' folder along with 'Customer A' Numbers spreadsheets etc. & 'Holiday budget 2015' Numbers spreadsheet should be