Results 1 to 2 of 2
  1. #1
    luisarca is offline Member
    Join Date
    May 2007
    Posts
    11
    Rep Power
    0

    Default How to extract information from a sentece

    Hi to all!
    I have some problems in extracting the information I need from a sentece. I'm reading an XML document, and I need some information.
    Here is the problem:
    <COMPONENT>
    <RESOURCE REF="myFirstPicture.jpg" TYPE="<some preamble>/image/jpg" />
    </COMPONENT>
    I'm able to detect when a component appears, and after that, I would like to read the next sentence and extract the info I need.

    Can somebody help me?

    Thank you very much,

    Luisarca

  2. #2
    Hossam Saraya is offline Member
    Join Date
    Dec 2007
    Posts
    1
    Rep Power
    0

    Default

    you may include in ur while :

    Java Code:
    int i = yourStream.indexOf("the text u detect");
    if(i > 1) {
    yourStream = yourStream.substring(i + yourStream.length());
    System.out.println(yourStream);
    }
    i had ur same problem when i made my java app which extracts the word meaning from an online dictionary. hope it helps..

    regards

Similar Threads

  1. How to extract info from a sentence
    By luisarca in forum XML
    Replies: 1
    Last Post: 06-07-2007, 06:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •