Get xml data from web into Matlab struct using webread and readstruct
古いコメントを表示
I have been getting data from a web API, which returns the data in xml format. I can parse this into a Matlab struct, but only by first saving the char array to a file and then reading it with readstruct.
The below works, but is there any way to do this without writing and reading a file unnecessarily? Either by passing the char array to readstruct or having webread output a struct directly (like it does when the web response is json)?
webresponse = webread(url, queryname, queryvalue);
name1 = [tempname(),'.xml'];
writelines(webresponse, name1);
out = readstruct(name1);
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Web Services についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!