{"id":5251,"date":"2013-11-17T05:06:59","date_gmt":"2013-11-16T18:06:59","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5251"},"modified":"2013-11-17T05:06:59","modified_gmt":"2013-11-16T18:06:59","slug":"java-html-parsing-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/java-html-parsing-primer-tutorial\/","title":{"rendered":"Java HTML Parsing Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Java\/Eclipse\/HTMLParse\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Java HTML Parsing Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Java\/Eclipse\/HTMLParse\/Java_Eclipse_HTML_Parse-55of.jpg\" title=\"Java HTML Parsing Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Java HTML Parsing Primer Tutorial<\/p><\/div>\n<p>Here is a tutorial that parses HTML in a Java console application overseen by the <a target=_blank tit='Eclipse IDE information from Wikiedia' href='http:\/\/en.wikipedia.org\/wiki\/Eclipse_%28software%29'>Eclipse IDE<\/a>.    For this tutorial, where we parse an HTML url via a parent HTML element of a designated HTML element type and class, and then drill down to display any text elements within that parent HTML element, we needed to get from the brilliant <a target=_blank title='SourceForge' href='http:\/\/sourceforge.net\/'>SourceForge<\/a>, and all its brilliant Open Source contributors, an external <a target=_blank title='Wikipedia information about Java jar files' href='http:\/\/en.wikipedia.org\/wiki\/JAR_%28file_format%29'>jar<\/a> Java archive file for the HTML parsing <a target=_blank title='htmlcleaner' href='http:\/\/xjaphx.wordpress.com\/tag\/htmlcleaner\/'><i>HtmlCleaner<\/i><\/a> library.  During the tutorial you&#8217;ll see one of the advantages of IDEs for Java work &#8230; making the use of external jar files easier to organize (than with command line javac\/java usage).<\/p>\n<p>You may be interested by the use of command line argument checking code, and the associated Run Configuration settings within the Eclipse Run->Run Configurations&#8230; to make use of this possibility, and if it is not used, the interactive <a target=_blank title='Java Scanner class information by Oracle' href='http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/Scanner.html'>Scanner methods<\/a> to accept interactive input from a Java user.<\/p>\n<p>Link to Java programming source code which you should rename to <a target=_blank title='AnalyzeHtml.java' href='http:\/\/www.rjmprogramming.com.au\/Java\/Eclipse\/HTMLParse\/AnalyzeHtml.java_GETME'>AnalyzeHtml.java<\/a><\/p>\n<p>Really really really weally (yes weally) really really hope you enjoy the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Java\/Eclipse\/HTMLParse\/\">tutorial<\/a>.   By the way, a strange thing happened while making this tutorial &#8230; <a target=_blank title='lunar coding' href='http:\/\/whereistheoutrage.net\/general\/lunar-eclipse\/#post-14651'>lunar coding<\/a>.<\/p>\n<p><b>Did you know?<\/b><\/p>\n<p><a target=_blank title='HTML inventor' href='https:\/\/www.google.com.au\/search?q=%22HTML+inventor%22&#038;ie=utf-8&#038;oe=utf-8&#038;rls=org.mozilla:en-US:official&#038;client=firefox-a&#038;gfe_rd=ctrl&#038;ei=TtKHUtKPGqaN8Qewo4DABg&#038;gws_rd=cr'>Tim Berners-Lee<\/a> invented HTML.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d5251' onclick='var dv=document.getElementById(\"d5251\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=ArrayList\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5251' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here is a tutorial that parses HTML in a Java console application overseen by the Eclipse IDE. For this tutorial, where we parse an HTML url via a parent HTML element of a designated HTML element type and class, and &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/java-html-parsing-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,12,37],"tags":[327,374,576,644,900,997,1319],"class_list":["post-5251","post","type-post","status-publish","format-standard","hentry","category-eclipse","category-elearning","category-tutorials","tag-did-you-know","tag-eclipse","tag-html","tag-java","tag-parsing","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/5251"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=5251"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/5251\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=5251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=5251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=5251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}