User Profile

Collapse

Profile Sidebar

Collapse
Merin Lalu
Merin Lalu
Last Activity: Jun 13 '12, 09:31 AM
Joined: Oct 5 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • identify a value which represents a string in regular expression

    I have a string "<html>Book s of:<b>John Smith</b><ul><li> <i> Title:</i>DBPrimer</li><li><i> Title:</i>Comp Systems
    </li></ul></html>"

    and i have a grammar

    <html>Books of:<b>#PCDATA</b><ul>(<li><i>T itle</i>#PCDATA</li>)+</ul></html>

    how can i retrieve...
    See more | Go to post

  • Merin Lalu
    started a topic insert integer as keys in hashtable
    in Java

    insert integer as keys in hashtable

    can anyone help me?/

    i want to insert keys of integer type to a hashtable. i can insert keys of string type in the hashtable. But integer keys not getting inserted.

    i am getting exception as

    java.lang.Class CastException: java.lang.Integ er cannot be cast to java.lang.Strin g

    thank u..
    See more | Go to post

  • Merin Lalu
    replied to can not find symbol class Head
    in Java
    Thanks a lot.. I got it..
    See more | Go to post

    Leave a comment:


  • Merin Lalu
    replied to can not find symbol class Head
    in Java
    actually i commented
    Code:
    if (heads.size () > 0){
    }
    I am submitting the code and HTML code

    Code:
     import org.htmlparser.Parser;
     import org.htmlparser.Tag;
     import org.htmlparser.Text;
     import org.htmlparser.util.ParserException;
     import org.htmlparser.visitors.NodeVisitor;
     import java.util.*;
    import org.htmlparser.filters.TagNameFilter;
    import org.htmlparser.nodes.TextNode;
    ...
    See more | Go to post

    Leave a comment:


  • Merin Lalu
    replied to can not find symbol class Head
    in Java
    the nodelist heads is null.. so heads.elementAt (0) is null

    but input htmlpage has an headtag in it. i dont know why it is printing null
    See more | Go to post

    Leave a comment:


  • Merin Lalu
    replied to can not find symbol class Head
    in Java
    But the Tag class does not have a method named removeAll(). so again error

    can not find symbol method removeAll()
    See more | Go to post

    Leave a comment:


  • Merin Lalu
    started a topic can not find symbol class Head
    in Java

    can not find symbol class Head

    Can any one help me?

    I got a code for the parse method of Parser class in html parser library from the link

    htmlparser.sour ceforge.net/javadoc/index.html

    the code is as follows

    Code:
    NodeList nl = parser.parse (null); // here is your two node list
     NodeList heads = nl.extractAllNodesThatMatch (new TagNameFilter ("HEAD"))
     if (heads.size () > 0) // there may
    ...
    See more | Go to post

  • while parsing, white spaces and newlines will be considered as string node.. other than white spaces, i need to print the string nodes.
    See more | Go to post

    Leave a comment:


  • Merin Lalu
    started a topic remove white spaces in html page while parsing.
    in Java

    remove white spaces in html page while parsing.

    can any one help me??

    i have an html page.. i want to parse the html page using htmlparser library.


    while parsing it should not consider whitespaces and newline..
    See more | Go to post

  • Merin Lalu
    replied to push all the non zero elements
    in Java
    i got it.. thank you for your reply..
    See more | Go to post

    Leave a comment:


  • Merin Lalu
    started a topic push all the non zero elements
    in Java

    push all the non zero elements

    Can any one tell me how to push all the non zero elements to one end of an array in java without creating a new array.
    See more | Go to post

  • Merin Lalu
    started a topic replace the element of an array of objects
    in Java

    replace the element of an array of objects

    Can anyone help me??

    I have an array of objects for a class. The class has two arraylist variables.

    I want to

    1) replace one particular object with another object with new arraylist values.

    2) replace another particular object with arraylist values set to null

    3)in the output, objects in the array should be in an order in which the object having arraylist values set to null...
    See more | Go to post

  • Merin Lalu
    replied to Remove head tag portion from an html page
    in Java
    i got it.. thanks a lot...
    See more | Go to post

    Leave a comment:


  • Merin Lalu
    replied to Remove head tag portion from an html page
    in Java
    yes.. i have htmlparser1.6
    See more | Go to post

    Leave a comment:


  • Merin Lalu
    replied to Remove head tag portion from an html page
    in Java
    It is a file. I want to parse the html file using htmlparser library after removing the head tag part from the html page
    See more | Go to post

    Leave a comment:


  • Merin Lalu
    started a topic Remove head tag portion from an html page
    in Java

    Remove head tag portion from an html page

    Can any one help me??

    I have an html page. i want to remove the contents inside the head tag. I need only the body part. whole head tag part should be removed.
    See more | Go to post

  • Merin Lalu
    started a topic index of arraylist in java
    in Java

    index of arraylist in java

    haii..

    I have a parent arraylist.. The elements of parent arraylist is another set of child arraylists (duplicate child arraylists are there). i need the index of each child arraylist.


    The problem is i am not getting the index of child arraylist if the child arraylist is a duplicate.

    Can anyone help me?? i am doing the code in java..
    See more | Go to post

  • Merin Lalu
    replied to html dom representation
    in Java
    thank u for ur reply..

    Actually i want to do it using htmlparser1.6 library in java.

    i have an html document.. i got the dom tree representation of the document using the following code. but i need the path of each node of the dom tree.

    the code is as follows..
    Code:
    import java.io.Serializable;
    import java.net.HttpURLConnection;
    import java.net.URLConnection;
    
    import org.htmlparser.Parser;
    ...
    See more | Go to post
    Last edited by Frinavale; Oct 16 '11, 11:19 PM. Reason: Added code tags. Please post code in code tags.

    Leave a comment:


  • Merin Lalu
    started a topic path of an html node
    in Java

    path of an html node

    i have an html document as follows

    <html>
    <body>
    <h1>world</h1>
    <br>
    List
    </body>
    </html>

    i want the path of each node of its dom tree representation

    i wrote a code using htmlparser library

    import org.htmlparser. Parser;
    import org.htmlparser. Node;
    import org.htmlparser. util.NodeList;
    ...
    See more | Go to post

  • Merin Lalu
    started a topic html dom representation
    in Java

    html dom representation

    can any one help me??

    I have an html document. i need the java code for the dom tree representation of that document. if i got the dom tree representation i can proceed with the next step of finding the path of each node

    please help me/...
    See more | Go to post
No activity results to display
Show More
Working...