I am trying to parse an xml to store values of a web in an array within an android app in this way:
//Parseo XML
try {
//Conexion app-web
URL url = new URL("https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml");
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new InputSource(url.openStream()));
doc.getDocumentElement().normalize();
//Interpretacion del XML
NodeList nodeList = doc.getElementsByTagName("Cube");
for(int i = 0; i < nodeList.getLength(); i++){
Node node = nodeList.item(i);
Element element = (Element)node;
valoresConversion[i] = Double.parseDouble(element.getAttribute("rate"));
}
Toast.makeText(this,"Sincronizacion finalizada",Toast.LENGTH_SHORT).show();
} catch (Exception e){
Toast.makeText(this,"Error",Toast.LENGTH_SHORT).show();
But when I execute this action by means of a button I get the error " D / NetworkSecurityConfig: No Network Security Config specified, using platform default "
I have given permission to the app from the manifest to be able to access the internet, and even then I can not get it to work. Can someone help me?