I am facing a weird problem.
What I am doing is I am storing some values in DB(oracle 11g) as varchar2 and fetching the values in java and working with the fetched data.
Now I have
as a value in DB and getting it in java using rs.getString()
. I am getting proper value
.
String newLine=rs.getString("column_value");
Now i parse a HTML page and get the whole page as a string.Suppose the page has 3 lines each depiciting ssome informations like below:
Time: 08 AM - 11 AM
Duration : 36 minutes
Now in code i will pass "Duration :" to a method and that will return me "36 minutes".
What logic i use is i get the index of "Duration :" and read till "
" is encountered.Code works fine if i declare the newline as
String newLine= "
";
But if i get it from DB it does not work.
I know i don't need to store this in DB but i don't want to hardcode these items. So i have to store it in DB only. Can anyone help me out in this???
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…