??? Is it Possible to Read an HTML file in PI !!! and check a word"Failure"

Hi All,
My requirement is to pick an HTML file and search for a word " Failure" If its present then i need to update a particular value if not then other value.
Regards,
Jude

>>My requirement is to pick an HTML file
can be done, if html is welformed xml.
>>and search for a word " Failure"
if you know which tag could contain the word "failure" then i think it is possible to search in graphical mapping.
>>If its present then i need to update a particular value if not then other value.
you said "particular value". Is it in the target message type, if yes, then you can decide.
I am not sure, whether your requirement and the purpose of using PI for this go together.
thanks
BJagdishwar.

Similar Messages

  • How to read an html file and replace a text using text_io

    hi,
    i want ro read an html file using text_io and replace a particular text with a new text
    eg: i want to replace a text called "data.js" and with "maps.js"
    how do i do this?

    You have to write your own code to do that. TEXT_IO is just a low level text file interface.
    You need to read in all the text, save it in some internal format (array of varchar2's maybe or in the DB) and then perform a search on the text you have read in, find out where the instances of "data.js" are located and substitute them with "maps.js" After that you need to write to a new file and delete the old one. There is no way to search and replace inside the existing file (what's sometimes referred to as 'in-place' substitution).
    See the help section called About the TEXT_IO package for an overview of how it works and some code examples.

  • 1.is it possible to read a .xls file and load it into an oracle table

    1.is it possible to read a .xls file and load it into an oracle table, using oracle database or oracle forms i.e. either utl_file, or text_io, or any other oracle tool.
    As far as I know we need a csv file or a txt ( tab delimited) file ?
    2.Are there any windows tools for the same

    Hi,
    If you want to use the DDE package to read the XLS file then yes, you will neeed to know the number of rows and columns in the input file.
    i.e. How will you know :
    1) How many columns are there in the input file.
    If I have a XLS file with the following data :
    R1C1 R1C2 R1C3 R1C4 R1C5 R1C6 R1C7
    xxx xx x
    Where R represents row and C represents column, then how will you know the each row has 7 columns. If you know the answer upfront, then it's not a issue.
    Using the DDE apprach, you will have to specify the RowNum and the ColumnNo of each idividual cells to read/write data from xls sheet.
    Look at the syntax in my ealier post.
    using the other approch (i.e. comma delimited text file - CSV file) , you need not know the number of columns as you can loop thru the input record till the last column is read.
    All you have to do is to look for the 'n' occurances of the field delimiter say ',', do a substr from the current position to the point where the ',' was found.
    This process is to be repeated in a loop till all columns are read.
    The TEXT_IO package can trap for EOF (End Of File).
    Hope I made myself clear.
    -- Shailender Mehta --

  • Opening a browser to read an HTML file

    I need to be able to open a browser to read an html file that I can specify. The HTML file probably, but not necessarily, reside on the same machine as the app.
    I've looked through the APIs amd can't seem to figure this one out.
    Any help would be appreciated.

    Do you really need to open a browser, or are you just wanting to bring the text of an HTML doc into your program? If by some chance it's the latter, then that can be done pretty easily with URLConnection.getInputStream()...

  • Custom html file with pix and links as Mac desktop display?

    Hi, in Windows it is possible to select an html file to use as your desktop display...pictures, web links, and links to network and local folders, files, and applications can be written directly into the html page. It was actually really nice.
    How can this be done on a Mac?
    It would be great to have personal pictures, text (poems and to do lists) displayed as the desktop background...with links to files (inspirational .mov files, recently used files, even the html file for the desktop itself for quick changes), links to start applications, and links to favorite websites...all accessible from the desktop itself.
    Alternatively, would these links need to be placed in the dashboard or expose or ? Would the text over a background image in html need to be composited into a static image file?
    thanks

    I don't believe there is a way in the Mac world to specify anything but image files to be used as your desktop.
    I might suggest that you open the HTML fileof your choice in a browser, and take a screen shot of the output. Then you can assign that screen shot to be your desktop.
    Command-shift-4 will give you a crosshair cursor to drag around the area you wish to capture.

  • [svn] 4561: Updated error. txt files for goodValidatorTest and patternFilterLoggingMessageFilterTest to fix failure on appservers other than Tomcat

    Revision: 4561
    Author: [email protected]
    Date: 2009-01-16 10:59:37 -0800 (Fri, 16 Jan 2009)
    Log Message:
    Updated error.txt files for goodValidatorTest and patternFilterLoggingMessageFilterTest to fix failure on appservers other than Tomcat
    checkintests: pass
    Modified Paths:
    blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/messagingService/validation/good ValidatorTest/error.txt
    blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/messagingService/validation/patt ernFilterLoggingMessageFilterTest/error.txt

    Dude this worked fantastic.   Thank you for posting.

  • Is it possible to load an html file on a frame

    Is it possible to make a java applet refresh(load) an html file which is loaded on different frame in the same browser window. In other words a web page is divided into 2 frames. One has the applet and the other is refreshed when the applet request it.
    Thanks

    Try something like :
    URL urlApplet = new URL(appletAddress);
    // "rightFrame" is the name of the frame in the page
    getAppletContext().showDocument(urlApplet,"rightFrame");
    And a HTML page like:
    <FRAMESET cols="35%, 65%" rows="100%">
    <FRAME SRC="/AppletBrowse/AppletBrowse.html" NAME="leftFrame" SCROLLING="auto">
    <FRAME SRC="/AppletResult/AppletResult.html" NAME="rightFrame" SCROLLING="auto">
    </FRAMESET>
    Is it what u want to do??

  • Possible to access an .html file stored on media card?

    I have downloaded web pages I built from my computer to the media card in my Blackberry 8310. After opening MEDIA on the home screen, I can click the menu > explore > navigate to the .html file and it will display.  Javascript does not function, however, even if it is turned on and is functional with web sites through my browser.  I presume I am having this problem because I am not viewing the file using a browser with this method.  This lead me to the thought of accessing the file through my browser.  When I start my browser then use the menu key > Go to, I cannot find the proper format command to access a file on the media card.  I am attempting a similar request as using a browser on a puter then typing c:\directory\file.  I have used the file//C:\ format along with other formats to no avail.  I am not sure if the device has a name.  I have tried Device:\ but that doesn't work.  I tried \Media Card and that doesn't work either.  I moved the files into devce memory hoping I could access it.  I would appreciate any help with either method I have tried.  Thanks, Ted

    I doubt it is possible. Pages is fairly limited when it comes to html.
    I would try finding another application or send the files as pdf. PDF may not be a good idea in marketing material, as the receiver may not even open the file, but if you present it in a nice way, it may work.

  • Reading in HTML file then writing to file - losing formatting.

    I am reading in a HTML file using a Buffered Reader then writing it to a file. However when i write it to a file using
    out = new PrintWriter(new BufferedWriter(new FileWriter(path, true)));
    out.write(content);
    out.flush();
    i seem to lose all carriage returns and find that the whole html is on one single line with the only noticable formatting being the spaces between the html tags.
    How can i stop it losing carriage returns?

    You only showed the part where you are writing it out.
    Does your reader code look like this:
      BufferedReader r = ...
      String content = "";
      while (true) {
        String line = r.readLine();
        if (line == null) break;
        content += line;
      }If it does, the problem lies here, as doing a readLine removes the line terminator. Soooo....
        content += line + "\n";Of course, to be most efficient and good, don't use String concatenation, use a StringBuffer (though it should be noted that when I decompiled this test code, suns compiler did indeed use a StringBuffer).
    When you print, use the PrintWriter methods print and priintln as they don't throw exceptions.

  • Cannot read the html files

    I cannot seem to make JavaHelp find my HTML files, although it has found my Map and XML files.
    The structure is as follows:
    - the XML files are in myclasspath/doc/onlinehelp
    - the HTML files are in myclasspath/doc/onlinehelp/html
    How should I reference them from my Map.jhm file?
    Have I forgottoen any enviroment variables?
    This is really urgent
    Thanks
    Bj?rn

    The entries in your map file should take the form
    <mapID target="target_string" url="html/filename.htm" />
    so that the url includes the relative path from the directory where the xml files are.

  • Calling HTML file from servlet and vice versa...

    i have got few questions..
    1- if a site is made in HTML then what should be used to put user login functionality in it, servlets or jsp or other option(specify)?
    2- im trying to do with servlets, so when im calling doPost method from HTML page and sending data, everything working fine but because of this the page refreshes and the HTML coding get lost, so how can i stop that from happening if possible, like showing the same page with messege = "Logged in".
    3- how can i call an HTML page from servlet?
    4- how can i send data from servlet to HTML page?

    that i m aware of, but when a servlet is called then the page will refresh n it will display the things that you have mentioned in the servlet file n not the things that u have mentioned in HTML file, n the page will be blank if u have not mentioned any HTML coding in servlet file.
    so i need to knw how to call back that prev HTML file so that the things i want to display can be displayed, i knw the same can be done by adding the HTML code in servlet file but i would like to know if there is any way to call back the HTML file.

  • I want to save a html file to server and then want to open it.

    Requirement: I'm having an applet which is having a button named letter. When a user clicks on the button, following should happen --> An event will occur which will read some data from backend system(mainframe) and will store that in a string variable. A html file is created using this data in the body part, and then it should open in a browser.
    My problem is how can I launch(open in a browser) this html file.
    1) Is it possible to launch this file without storing it on hard drive.
    2)To use Runtime.getRuntime.exec(cmd.exe /c start filepath) , I need to store this file somewhere. How can i store this on server?

    1) Can you please give me an example showing how i can use Jtextpane.For html, JEditorPane (instead of JTextPane is better)
    For examples, go through these tutorial trails:
    [http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html]
    [http://java.sun.com/docs/books/tutorial/uiswing/components/text.html]
    2)Also please tell me how to save the file on user's machineSee this trail:
    [http://java.sun.com/docs/books/tutorial/essential/io/index.html]
    and how can i delete the file from user's machine once it is closed by the user?Very simple, read the api docs: [http://java.sun.com/javase/6/docs/api/java/io/File.html#delete()]
    Thanks!

  • Possible to combine purchased book files from desktop and laptop?

    When my original Win 7 computer started having problems, I consolidated all the iTunes files (music, books, video) on that computer and stored the backup on a thumb drive per instructions on the Apple support site, with the idea of putting them on a new Win 7 computer at some point. But for right now, I'd like to consolidate the files from the old Win 7 to my laptop, as that will be my main repository of iTunes files -- books, music and video -- until I get a new Win 7 computer set up. However, I had also purchased some other books which were saved on my laptop; thus I'd like to combine the files. Before combining, I'd like to be able to transfer the new books from the laptop to my iPad (which was paired with the old Win7, which has now been deactivated). I'd like to do this without losing any of the 200+ books already on the iPad, Of course, at some point, I'd like to sync the music that was saved on the Win 7 computer to the iPad, which thus far has been used primarily for reading and playing games. This will be done once the files are safely ensconced on my laptop.  Above all, I don't want to lose anything from the old desktop, from iTunes on the laptop, or from the iPad in this process.  Can anyone explain to me how I might accomplish this? This process is so foreign to those of us who are well and truly accustomed to transferring and merging files in Windows and I am quite paranoid about losing any data. Thank you for any and all guidance you can offer!

    spencerbell wrote:
    Should I upgrade the iMac, convert the catalog, back it up, then install LR 3 on the laptop and move the photos and restore the catalog, or should I just back up the 1.x catalog and move everything to the laptop and convert it there?
    Basically you can go either way. I would do the upgrade of the catalog on the iMac, so there will be no need to install LR1 on the laptop. You'd still need to enter the LR1 serial no. (besides the LR3 serial no.) on the laptop after installation of LR3.4 though.
    Also, what's the best way to move everything to the laptop?  I have an external drive that is probably big enough for all the files.
    You might want to have a look at Victoria Bamptons Blog Post about the subject. Don't forget to also copy presets, plugins and possible ACR defaults to the new computer.
    Beat Gossweiler
    Switzerland

  • How to upload an html file using jsp and jdbc

    Hi,
    im trying to upload an html page using JSP and jdbc. but of no success.
    my aim is to keep some important html pages in the database.the file size can vary.the file has to be selected from a local machine (through the browser) and uploaded to a remote machine(where the databse resides).
    any help/sample code or pointer to any helpful link is appreciated.
    thanks in advance
    javajar2003

    When uploading a file, I use a byte array as a temporary buffer..
    So, you should then be able to store the byte array in the
    database as binary data.
    example>
    //Temporary Buffer To Store File
    byte[] tmpbuffer = new byte[860];
    //Some Code To Upload File...
    //File Should Now Be In Byte Array
    //Get DB Connection and execute Prepared Statement
    Connection con=//GET DB CONNECTION;
    String sql=insert into TABLE(page) values(?);
    PreparedStatement ps=con.prepareStatement(sql);
    ps.setBytes(1,tempbuffer);
    ps.executeUpdate();
    //Close PS and Free DB Connection
    ..... and this method looks like you dont even have
    to store the file in a byte array, you can just give
    it the input stream.
    ps.setBinaryStream(int, inputStream, int);
    You may have to make several attempts at this. I have
    uploaded a file and temporarily stored it in a byte array,
    but have never from there stored it in the DB as binary
    data.. but this looks like it'll work.
    Good Luck!

  • Read from one file ... and write

    I had written below code to read from a file
    which has input in below format...
    $ filla
    % dillla
    I wrote a code to read from the below file and I want to write into another file...
    in another format...like
    filla, $
    dilla, %
    I wrote as below... but my code doesn't work....i commented most of the code becoz I doubt ....
    I read the file...line by line...
    each line has two words one is special characters($ or %) and the other is some name... separated by space..
    I stored both in different arrays...and thought to write them in output file...
    import java.io.*;
    public class data
           public static void main(String args[])
                int kMaxLines = 60000;            
                  String[][] valuePairs = new String[2][kMaxLines];
                  String symbol [] = new String[kMaxLines];
               String name [] = new String[kMaxLines];
               int k = 0;
                       try            
                      FileInputStream fstream = new FileInputStream("c:/inputs.txt");
                      DataInputStream datastream = new DataInputStream(fstream);
                      BufferedReader br = new BufferedReader(new InputStreamReader(datastream));
                      //FileWriter output = new FileWriter("c:/output.txt");
                 //BufferedWriter bw = new BufferedWriter(output);
                      String names; 
                      String strLine;
                      int line = 0;
                      while ((strLine = br.readLine()) != null)
                           String temp_strs[] = strLine.split(" ");
                          for (int j = 0; j < 2; j++)
                          valuePairs[j][line] = temp_strs[j];
                         //System.out.println(temp_strs[0] + " " + temp_strs[1]);
                          symbol[k]= temp_strs[0];  
                          name[k]=temp_strs[1];
                          line++;
                          k++;
                      for (k=0; k < kMaxLines; k ++)
                      System.out.println(symbol[k]+ "" + name[k]); // when I print it is giving null value...
                      } // so what I do to get those values into global array...
                          datastream.close();
                // to write to file
                   //String names_str;
                        //bw.write("@relation train");
                  //for(k=0; k<kMaxLines; k++)
                    //  names_str = names+""+name[k];
                   //bw.write("@attribute names" + " {"+names_str+"}");
                   //bw.write("@attribute class {+,-}");
                   //bw.write("@data"+"\n");
                    // for (k=0;k<kMaxLines; k++)
                   //bw.write("name[k]+","+symbol[k]");
                       catch (Exception e)
                      //file not found exception...
                            e.printStackTrace();
     

    Why the multiple arrays?
    I'd just read it into List<String[]>... an extensible collection of "the fields on each line"... then you just write them out as required.
        second-field + comma + first-field.
    I suggest your next move should be to take a backup copy of your current class then rip-all that commented-out code out of it, and reformat it properly... starting from a clean(er) slate... then try swapping over to a List<String[]> instead of that cumbersome String[][] matrix.
    Try that... if you get stuckeroonied then don't be afraid to ask again.
    Cheers. Keith.

Maybe you are looking for

  • Cost of Goods Sold in IS Oil

    Hi Friends, Could someone help out with what technologies/databases are being used to capture and maintain the Cost of Goods Sold?  (e.g., SAP MM examples or something else) ? I am working on a downstream project for an oil major and would like to de

  • How do I rename a file on an external hard drive

    My sister is trying to rename a file on an external hard drive and when she right clicks on it, it does. to give her any options to change file name or anything

  • Can't drag clip in expert without distortion of interface

    can't drag clip in expert without distortion of interface What's wrong?

  • GSM of the i photo books

    I have made a beautiful book for a friend and they are asking me what gsm the book is printed on. Can anyone help me? Thanks Snappy

  • Freezing: Protégé M780 w/ Express Port Replicator II

    I've recently been using my M780 laptop with an Express Port Replicator II. Ever since I've been using the port replicator, my laptop has been freezing intermittently. The screen will freeze and the laptop's fan will begin to blow loudly. I'm using W