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)?

13 ビュー (過去 30 日間)
I want to use a function, such as XMLREAD, to parse XML data from a string, instead of from a file.

採用された回答

MathWorks Support Team
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
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 ExchangeString Parsing についてさらに検索

タグ

製品


リリース

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by