Import multiple xml.files in a folder

조회 수: 8 (최근 30일)
Vlatko Milic
Vlatko Milic 2021년 11월 16일
댓글: Vlatko Milic 2021년 11월 16일
Hi,
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?
Sincerely,

답변 (1개)

ANKUR KUMAR
ANKUR KUMAR 2021년 11월 16일
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));
end
  댓글 수: 1
Vlatko Milic
Vlatko Milic 2021년 11월 16일
Thank you for the feedback Ankur! I get the error "Error using xmlread (line 112)
Input must be a file name or URL"
Any idea on what it can be?

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

카테고리

Help CenterFile Exchange에서 Structured Data and XML Documents에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by