• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

how the hell do you parse java?

wasssup

Diamond Member
So i'm working on a last minute program (and later I gotta cram for an exam), and i'm almost done, but the thing is I don't know how to parse html in java :|

I can stream it to standard output, but that's it...
 
I don't have much experience with it, but have you looked at the HTMLDocument class provided in the Java API?
 
err i can barely code a simple java program, let's just forget about coding a compiler 🙂

I figured it out though, and i'm like 99% done with this part of the program (the main part, yay); HOWEVER upon trying it out on several different yet similar sources, it looks like I have to return the index of the nth occurance of a text string. I know of indexOf() and lastIndexOf(), but obviously these won't return the index of the nth occurance...

It wouldn't be stringterm(), would it? I've been googling for the last hour or so trying to figure this out 🙁 ..the one java book I own seems to suck ass.
 
Originally posted by: wasssup
err i can barely code a simple java program, let's just forget about coding a compiler 🙂

I figured it out though, and i'm like 99% done with this part of the program (the main part, yay); HOWEVER upon trying it out on several different yet similar sources, it looks like I have to return the index of the nth occurance of a text string. I know of indexOf() and lastIndexOf(), but obviously these won't return the index of the nth occurance...

It wouldn't be stringterm(), would it? I've been googling for the last hour or so trying to figure this out 🙁 ..the one java book I own seems to suck ass.
This will find the start of the nth occurance
 
thanks Kilrsat, that worked perfectly 🙂

now I just have another (basic) problem to figure out and i think i'll be able to finish this problem..i'll post it in a new thread because this problem has been solved 😀
 
Back
Top