You do not need a line:
<uses-library android:name = "org.jsoup.Jsoup"/>
in the manifest file. All you need to do to use Jsoup is to provide it part of your build path by following these steps:
- Right click on your project and select Properties
- Select the Java build path and select Add External JARs ...
- Browse to jsoup jar file
Then Jsoup will act like any other library in java. For example, in my application, I use it like this:
try { Document doc = Jsoup.connect( myHtml ).get(); Elements table = doc.select( "table#ctl00_ContentPlaceHolder1_tblPasses" );
Note. I did not include all my code for it because it is quite long. Anyway, after that you simply import the classes as needed, for example, in mine I use the following:
import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements;
Katana24
source share