Effacer les filtres
Effacer les filtres

download xml text into struct

2 vues (au cours des 30 derniers jours)
Timon Niedecken
Timon Niedecken le 20 Mai 2018
Hi there, I want to download data and save it in an struct file. Unfortunately my solution doesn't look clean: Data example: OSM Data
function x = download(input)
x = webread(strcat('https://www.openstreetmap.org/api/0.6/relation/', num2str(input)));
fileID = fopen('temp.txt','w');
fprintf(fileID,x);
fclose(fileID);
x = xml2struct('temp.txt');
delete temp.txt
Is there a way without creating and deleting an text file?
Edit: After i had some other Problems with using xml, i decided i wont consider this solution anymore. I am now working with strfind() instead.
  1 commentaire
dpb
dpb le 20 Mai 2018
What's xml2struct? Not ML function...

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Downloads dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by