Import multiple xml.files in a folder
18 views (last 30 days)
Show older comments
Commented: Vlatko Milic on 16 Nov 2021
I have more than 100 xml.files in a folder and I would like to import them in matlab. Each as a separate table for example and also to keep the names of the various file names. I cannot use the import tool since it does not deal with this file type. Does anybody have some advice?
ANKUR KUMAR on 16 Nov 2021
You can use the dir command to store the file names and use for loop to read all the files.
F = dir('path/*.xml')
for index = 1:length(F)
DOMnode = xmlread(F(index));
Find more on Structured Data and XML Documents in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!