#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    1
    Rep Power
    0

    Get the tag names from xml


    I am trying to list down all the tags present in the xml using following regex but somehow its not working. Any help would be appreciated. I can't parse xml because I am not sure if the xml would be well-formed so I think using regex would be best to do it.

    Pattern pattern = Pattern.compile("<([^/ >]*)>");

    Thanks in advance,
    Mandy
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    spaceBAR Central
    Posts
    225
    Rep Power
    41
    Check out this info:
    http://stackoverflow.com/questions/9412946/regular-expression-for-getting-text-between-xml-elements

IMN logo majestic logo threadwatch logo seochat tools logo