Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8968501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:27:47+00:00 2026-06-15T17:27:47+00:00

I was having trouble finding any documentation at all on a type of parsing

  • 0

I was having trouble finding any documentation at all on a type of parsing I need to do for a Java string.

So, It’s not something simple like parsing by lines or commas or something, it’s a bit more complicated.

My program grabs a web page’s source, and I need to parse it for the content of a view tags.

Something like parsing it for what’s between

<input name="sid" type="hidden" value="

and

" />

So, if the web page had this string:

<input name="sid" type="hidden" value="stringvaluehere" />

It would output

stringvaluehere

Can anyone help? I’ve found no sort of documentation on anything like this at all, and asking around at other sources has been no help.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:27:48+00:00Added an answer on June 15, 2026 at 5:27 pm

    You could use a library for this, such as JSoup. It’s often much easier than trying to parse the DOM manually.

    Document doc = Jsoup.connect("http://www.example.com").get();
    Elements inputs = doc.select("input#sid");
    for(Element input : inputs) {
        System.out.println(input.attr("value"));
    }
    

    Simple to use & importantly easy to read.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble finding documentation on the jQuery ajax error. I'd like to create
I am having a lot of trouble finding any documentation on the header included
I'm having trouble finding any documentation on how the SqlWorkflowInstanceStore and how it handles
Maybe I'm missing something, but I'm having a lot of trouble finding any information
I'm having trouble finding any resource for adding ctrl-z undo capability to a Flex
I'm having trouble finding/getting any logging output from a web service. I have a
I am having trouble finding out why my iAd is not being removed after
I'm having trouble finding the reason why my navigation menu is not popping up
I'm having some trouble finding documentation on CLOSING a blackberry map. My map opens,
I've been reading mako / pylons documentation and am having trouble finding good examples

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.