Convert XML file to a MATLAB structure

조회 수: 151 (최근 30일)
Johan
Johan 2011년 6월 9일
댓글: S. Gokhun Tanyer 2022년 12월 19일
I'm trying to convert a XML file to a matlab structure (I want to use numbers and data from the file), I've tried to use the suggested XML parse function from the website, but it does not work.
Is there another function or is there someone who could explain how to use the function? BR Johan

채택된 답변

Walter Roberson
Walter Roberson 2011년 6월 9일
Have you tried the built-in xmlread ? If so then what happened when you tried to use it?

추가 답변 (3개)

Pritom Kumar Saha
Pritom Kumar Saha 2021년 8월 3일
Try
S = readstruct("abcd.xml")
it works on my matlab version.
It should work on matlab 2020b or higher version.
  댓글 수: 3
Seth
Seth 2022년 3월 9일
This worked for me very well - thank you!
xmlread did not work well for my files/data. This is a good example of why this site is so helpful!
S. Gokhun Tanyer
S. Gokhun Tanyer 2022년 12월 19일
Thanks, worked elegantly. No problem left on my side. Thanks again!

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


Brad
Brad 2011년 9월 12일

wildan
wildan 2011년 10월 12일
How to convert DWG to XML. DWG is format from AutoCAD

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by