Results 1 to 7 of 7
  1. #1
    Cylab is offline Member
    Join Date
    Jun 2010
    Posts
    29
    Rep Power
    0

    Default compare the remaining of Strings for equality

    E.g. <kind>moon</kind>
    If one string starts with < (and not </) and the other starts with </, is there any way of comparing the remaining for equality.

    As an idea, I want to push the string starting with < into stack, when / is encountered pop off from stack.

    Thanks.

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    Don't multipost!! You have an answer in your other thread.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  3. #3
    Cylab is offline Member
    Join Date
    Jun 2010
    Posts
    29
    Rep Power
    0

    Default

    It was not Answer

  4. #4
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    IgnoreList++
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,570
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Cylab View Post
    It was not Answer
    imho using a proper XML parser is the way to go but feel free to hack something together and we can show you the exceptions, i.e. Strings accepted by your hacky solution while they shouldn't and Strings rejected by your solution while they should be accepted. IgnoreList++

    Jos

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,516
    Rep Power
    25

    Default

    I think this is a student exercise to see what it takes to write a XML parser.
    See posts at To parse Strings without parsing libraries - Page 2 - Java

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by PhHein View Post
    Don't multipost!! You have an answer in your other thread.
    Agree. Cylab, please comply with the forum rules and do not multipost. I'm locking this thread.

Similar Threads

  1. compare the remaining of Strings for equality
    By Cylab in forum New To Java
    Replies: 5
    Last Post: 08-19-2010, 02:42 PM
  2. Compare between 2 Strings
    By ChaosINC in forum New To Java
    Replies: 3
    Last Post: 01-17-2010, 11:39 AM
  3. [SOLVED] Cant compare strings sent by client
    By christuart in forum Networking
    Replies: 15
    Last Post: 09-01-2008, 03:24 AM
  4. JSTL -- Comparing two strings for equality
    By trinkets in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 02-12-2008, 04:39 PM
  5. how to compare two strings
    By elizabeth in forum New To Java
    Replies: 7
    Last Post: 08-06-2007, 03:57 AM

Posting Permissions

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