URLConnection cn; URL url = new URL( "http://apps-for-android.googlecode.com/svn/trunk/CLiCkin2DaBeaT/AndroidManifest.xml"); cn = url.openConnection(); cn.connect(); InputStream stream = cn.getInputStream(); DocumentBuilder docBuild = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document manifestDoc = docBuild.parse(stream); NodeList manifestNodeList = manifestDoc.getElementsByTagName("manifest"); String versionStr = manifestNodeList.item(0).getAttributes().getNamedItem("android:versionCode") .getNodeValue(); version = Integer.parseInt(versionStr); NodeList clcNodeList = manifestDoc.getElementsByTagName("clc"); marketId = clcNodeList.item(0).getAttributes().getNamedItem("marketId").getNodeValue(); <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.clickin2dabeat" android:versionCode="2" android:versionName="0.2"> <clc marketId="253290493506327431"/> String packageName = C2B.class.getPackage().getName(); int currentVersion = 0; try { currentVersion = getPackageManager().getPackageInfo(packageName, 0).versionCode; } catch (NameNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); }