• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to extract inner text from inner html ?  RSS feed

 
Niti Kapoor
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
   if(wb1.getLocation().contains("&ini=")){
                  JOptionPane.showMessageDialog(null, "got "+wb1.getLocation());
                  String html = (String) wb1.executeScript("document.documentElement.innerHTML");
                  System.out.println(html);

this is what i done for innerhtml but i want inner text from the inner html please help
 
Niti Kapoor
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

this is the html from which i want to print the text part and replace all tags and save it .
 
Niti Kapoor
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i had used innertext it is converted but now the problem is when i save the content in file it only saves first four line might be bcz every tym it check the url and it get the content

|[server]||[app]|host_name=pmms.ankiti.com|ns=|session_name=pmms_ankiti_com|lang=en||[portal]|host_name=mms.ankiti.com|ns=|locale=en|domain=pmms.ankiti.com|ent_id=|app=mm-pmms|sec_ns=ankiti|sec_conf=sec-staff-lgc|sec_permissions=mms.ankiti.com|locales=mmstech|email=service@pressmonitor.com|email_name=Press Monitor|email_cc=news@ankiti.com||[shell]|id=wssoj75f2|host_name=pmms.ankiti.com|domain=ankiti.com|ent_id=|locale=|head=<meta charset="utf-8">

|[server]||[app]|host_name=pmms.ankiti.com|ns=|session_name=pmms_ankiti_com|lang=en||[portal]|host_name=mms.ankiti.com|ns=|locale=en|domain=pmms.ankiti.com|ent_id=|app=mm-pmms|sec_ns=ankiti|sec_conf=sec-staff-lgc|sec_permissions=mms.ankiti.com|locales=mmstech|email=service@pressmonitor.com|email_name=Press Monitor|email_cc=news@ankiti.com||[shell]|id=wssoj75f2|host_name=pmms.ankiti.com|domain=ankiti.com|ent_id=|locale=|head=<meta charset="utf-8">
|[server]||[app]|host_name=pmms.ankiti.com|ns=|session_name=pmms_ankiti_com|lang=en||[portal]|host_name=mms.ankiti.com|ns=|locale=en|domain=pmms.ankiti.com|ent_id=|app=mm-pmms|sec_ns=ankiti|sec_conf=sec-staff-lgc|sec_permissions=mms.ankiti.com|locales=mmstech|email=service@pressmonitor.com|email_name=Press Monitor|email_cc=news@ankiti.com||[shell]|id=wssoj75f2|host_name=pmms.ankiti.com|domain=ankiti.com|ent_id=|locale=|head= |header_bar=

MMS Print

|header_brand=|header_menu=|footer_bar=|footer_brand=|footer_menu=|change_at=2017-07-04 03:38:25||[user]|id=7f701032821e1e4d69cfcf7ee|ns=ankiti|ent_id=ank-1|code=mm-dc-rajveer|name=Rajveer verma|user_id=rajveersingh.kumar5@gmail.com|password=$2y$10$b8SLaZYPW/XAZWHWgaVg0.aL4L6sxgmpEnZrOLsGiC3hQu/22xR/m|password_old=*AAD9BAB0626ADA4743CC7582CC20E992C509D43|phone=9990367022|status=|status_remark=|permissions=mms.ankiti.com|created_at=2016-08-14 04:47:47|login_at=2017-09-16 13:26:49|change_at=2017-06-07 14:23:13|logout=`sec_loggedinas Rajveer verma `sec_logout||[pm]|work_date=2017-09-16|work_till=2017-09-16 23:59:59|work_from=2017-09-16 00:00:00|ns=pmin|centre=delhi|ymd=20170916|bar=PM Workdate: 2017-09-16 NS: pmin From: 2017-09-16 00:00:00 Till: 2017-09-16 23:59:59||[pml]|work_date_long=Saturday, 16th September 2017|work_date=2017-09-16|year_data_dir=//192.168.2.18/pm8/data/pmin/2017|month_data_dir=//192.168.2.18/pm8/data/pmin/2017/201709|date_data_dir=//192.168.2.18/pm8/data/pmin/2017/201709/20170916|date_data_path=/sata1/pm8/data/pmin/2017/201709/20170916|
|[server]||[app]|host_name=pmms.ankiti.com|ns=|session_name=pmms_ankiti_com|lang=en||[portal]|host_name=mms.ankiti.com|ns=|locale=en|domain=pmms.ankiti.com|ent_id=|app=mm-pmms|sec_ns=ankiti|sec_conf=sec-staff-lgc|sec_permissions=mms.ankiti.com|locales=mmstech|email=service@pressmonitor.com|email_name=Press Monitor|email_cc=news@ankiti.com||[shell]|id=wssoj75f2|host_name=pmms.ankiti.com|domain=ankiti.com|ent_id=|locale=|head=<meta charset="utf-8">
http://192.168.2.18/a3/host/pmms.ankiti.com/?module=home&ini=rajveersingh
|[server]||[app]|host_name=pmms.ankiti.com|ns=|session_name=pmms_ankiti_com|lang=en||[portal]|host_name=mms.ankiti.com|ns=|locale=en|domain=pmms.ankiti.com|ent_id=|app=mm-pmms|sec_ns=ankiti|sec_conf=sec-staff-lgc|sec_permissions=mms.ankiti.com|locales=mmstech|email=service@pressmonitor.com|email_name=Press Monitor|email_cc=news@ankiti.com||[shell]|id=wssoj75f2|host_name=pmms.ankiti.com|domain=ankiti.com|ent_id=|locale=|head= |header_bar=

MMS Print

|header_brand=|header_menu=|footer_bar=|footer_brand=|footer_menu=|change_at=2017-07-04 03:38:25||[user]|id=7f701032821e1e4d69cfcf7ee|ns=ankiti|ent_id=ank-1|code=mm-dc-rajveer|name=Rajveer verma|user_id=rajveersingh.kumar5@gmail.com|password=$2y$10$b8SLaZYPW/XAZWHWgaVg0.aL4L6sxgmpEnZrOLsGiC3hQu/22xR/m|password_old=*AAD9BAB0626ADA4743CC7582CC20E992C509D43|phone=9990367022|status=|status_remark=|permissions=mms.ankiti.com|created_at=2016-08-14 04:47:47|login_at=2017-09-16 13:26:49|change_at=2017-06-07 14:23:13|logout=`sec_loggedinas Rajveer verma `sec_logout||[pm]|work_date=2017-09-16|work_till=2017-09-16 23:59:59|work_from=2017-09-16 00:00:00|ns=pmin|centre=delhi|ymd=20170916|bar=PM Workdate: 2017-09-16 NS: pmin From: 2017-09-16 00:00:00 Till: 2017-09-16 23:59:59||[pml]|work_date_long=Saturday, 16th September 2017|work_date=2017-09-16|year_data_dir=//192.168.2.18/pm8/data/pmin/2017|month_data_dir=//192.168.2.18/pm8/data/pmin/2017/201709|date_data_dir=//192.168.2.18/pm8/data/pmin/2017/201709/20170916|date_data_path=/sata1/pm8/data/pmin/2017/201709/20170916|
<!DOCTYPE html><html class='no-js' dir='ltr' lang='en'><head><meta charset="utf-8">
|[server]||[app]|host_name=pmms.ankiti.com|ns=|session_name=pmms_ankiti_com|lang=en||[portal]|host_name=mms.ankiti.com|ns=|locale=en|domain=pmms.ankiti.com|ent_id=|app=mm-pmms|sec_ns=ankiti|sec_conf=sec-staff-lgc|sec_permissions=mms.ankiti.com|locales=mmstech|email=service@pressmonitor.com|email_name=Press Monitor|email_cc=news@ankiti.com||[shell]|id=wssoj75f2|host_name=pmms.ankiti.com|domain=ankiti.com|ent_id=|locale=|head= |header_bar=

MMS Print

|header_brand=|header_menu=|footer_bar=|footer_brand=|footer_menu=|change_at=2017-07-04 03:38:25||[user]|id=7f701032821e1e4d69cfcf7ee|ns=ankiti|ent_id=ank-1|code=mm-dc-rajveer|name=Rajveer verma|user_id=rajveersingh.kumar5@gmail.com|password=$2y$10$b8SLaZYPW/XAZWHWgaVg0.aL4L6sxgmpEnZrOLsGiC3hQu/22xR/m|password_old=*AAD9BAB0626ADA4743CC7582CC20E992C509D43|phone=9990367022|status=|status_remark=|permissions=mms.ankiti.com|created_at=2016-08-14 04:47:47|login_at=2017-09-16 13:26:49|change_at=2017-06-07 14:23:13|logout=`sec_loggedinas Rajveer verma `sec_logout||[pm]|work_date=2017-09-16|work_till=2017-09-16 23:59:59|work_from=2017-09-16 00:00:00|ns=pmin|centre=delhi|ymd=20170916|bar=PM Workdate: 2017-09-16 NS: pmin From: 2017-09-16 00:00:00 Till: 2017-09-16 23:59:59||[pml]|work_date_long=Saturday, 16th September 2017|work_date=2017-09-16|year_data_dir=//192.168.2.18/pm8/data/pmin/2017|month_data_dir=//192.168.2.18/pm8/data/pmin/2017/201709|date_data_dir=//192.168.2.18/pm8/data/pmin/2017/201709/20170916|date_data_path=/sata1/pm8/data/pmin/2017/201709/20170916|
<!DOCTYPE html><html class='no-js' dir='ltr' lang='en'><head><meta charset="utf-8">  this is the content
 
Niti Kapoor
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


    new CreateFileExample.java
this is how im saving the content which im getting from if part but its making the 6 files and saving the content but the content which is saving is also not complete?please help
 
Niti Kapoor
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is how i resolve the issue myself thanks by using file.write
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!