hi i am a begginer in java and i neeed help in completing this program...
sushant5252 0 Newbie Poster
Recommended Answers
Jump to PostTry to read line by line. Use the methods hasNextLine and readLine. Then save that line into a String.
Once you have the String, use the method indexOf(String) and find where the "<text>" and "</text>" are found. Then use the substring method.
All the above methods can be found at …
Jump to PostsubString(0+6, 10)
or
subString(0+"<text>".length(), 10)
Jump to PostAnother good thing would be to check if the line you are trying to parse has that tag.
First call the indexOf method. If it returns -1 then the line doesn't have that tag <text> , so continue with the next line.An in case that the line has …
All 9 Replies
yasuodancez -3 Newbie Poster
sushant5252 0 Newbie Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
NormR1 563 Posting Sage Team Colleague
jon.kiparsky 326 Posting Virtuoso
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
jon.kiparsky 326 Posting Virtuoso
sushant5252 0 Newbie Poster
jon.kiparsky 326 Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.