필터 지우기
필터 지우기

download xml text into struct

조회 수: 2 (최근 30일)
Timon Niedecken
Timon Niedecken 2018년 5월 20일
편집: Timon Niedecken 2018년 5월 25일
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
dpb
dpb 2018년 5월 20일
What's xml2struct? Not ML function...

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by