How can I use a function, such as XMLREAD, to parse XML data from a string, instead of from a file in MATLAB 7.5 (R2007b)?
조회 수: 14 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2010년 5월 20일
댓글: Walter Roberson
2020년 8월 14일
I want to use a function, such as XMLREAD, to parse XML data from a string, instead of from a file.
채택된 답변
MathWorks Support Team
2010년 5월 20일
The ability to parse XML data from a string, instead of from a file is not available in MATLAB.
To work around this issue, use the attached file, 'XMLREADSTRING.m', which is a modified version of the XMLREAD function:
Sample usage:
% Parse.
myTestDoc = xmlreadstring('<data>Test</data>');
% Write to file in order to test.
xmlwrite('mytest.xml', myTestDoc);
댓글 수: 1
Walter Roberson
2020년 8월 14일
Thanks, Jasper, I was looking for something like that yesterday for https://www.mathworks.com/matlabcentral/answers/579150-failed-to-read-xml-error-when-using-xmlread?s_tid=srchtitle
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 String Parsing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!