Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: HI PLS HELP

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow HI PLS HELP

    how to extract only the ID Selector names and Class Selector names from a CSS file using java Program?


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: HI PLS HELP

    Post sample lines from the file and highlight the section of the lines that you want to extract.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Re: HI PLS HELP

    Quote Originally Posted by Norm View Post
    Post sample lines from the file and highlight the section of the lines that you want to extract.
    .bodmas {
    font-family: arial;
    }
    #himas {
    background-color:#CCC;
    border: 1px solid;
    color:#39F;
    text-align: center;
    }

    .tab {
    background-color: #F60;
    border: 1px solid #39F;
    width: 100%;
    }
    #dth {
    border: 0px;
    text-align: center;
    }
    #p {
    color:#09F;
    text-indent: 20px;
    }
    #one.two
    {
    color: red;
    }
    .three.four
    {
    color:black;
    }

    Now i want to Extract the class selectors [.bodmas ,, .tab] and ID selectors [#himas, #dth] and want to list out using iterator in java....

    Need Output like..,

    List of Class Selectors :

    1. bodmas
    2. tab
    etc..,

    List of ID Selectors :

    1. himas
    2. dth
    etc..,

  4. #4
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: HI PLS HELP

    Since CSS is a formal language, in all likelihood Java parsers for this type of task already exist. I would Google for them and then use them, rather than try to re-invent that which has already been well invented.

Similar Threads

  1. pls.pls.pls.help with this
    By izzahmed in forum What's Wrong With My Code?
    Replies: 8
    Last Post: October 25th, 2011, 11:30 AM
  2. Pls help me
    By rose_brit3 in forum Loops & Control Statements
    Replies: 3
    Last Post: September 28th, 2010, 09:57 AM
  3. Pls Help
    By randika11 in forum JDBC & Databases
    Replies: 3
    Last Post: July 20th, 2010, 05:52 AM
  4. pls help me
    By sandeep_636338fae in forum Java Theory & Questions
    Replies: 1
    Last Post: January 4th, 2010, 04:03 PM
  5. pls tell me where the problem is....
    By subhopam in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 16th, 2009, 02:53 PM