+getUserAgentForBundle(m_context.getBundle(0))
);
is = conn.getInputStream();
// Create the parser Kxml
XmlCommonHandler handler = new XmlCommonHandler();
handler.addType("bundles", ArrayList.class);
handler.addType("repository", HashMap.class);
handler.addType("extern-repositories", ArrayList.class);
handler.addType("bundle", MultivalueMap.class);
handler.addType("import-package", HashMap.class);
handler.addType("export-package", HashMap.class);
handler.setDefaultType(String.class);
br = new BufferedReader(new InputStreamReader(is));
KXmlSAXParser parser;
parser = new KXmlSAXParser(br);
try
{
parser.parseXML(handler);
}
catch (Exception ex)
{
System.err.println("Failed to parse '"+url+"': "+ex.getMessage());
ex.printStackTrace();
return;
}
List root = (List) handler.getRoot();
for (int bundleIdx = 0; bundleIdx < root.size(); bundleIdx++)
{
Object obj = root.get(bundleIdx);
// The elements of the root will either be a HashMap for