How to export Simulink models (with Stateflow components) to XML ?

Hello,
I would need to know how can I export Simulink models (and some of these latter may also have Stateflow components, such as State Charts etc.) to XML.
I have typed the following MATLAB commands:
modelName = 'sf_aircraft' % model of the name without extension
save_system(modelName, 'xml_model.xml', 'ExportToXML', true)
But I have the following warning :
Warning: The 'ExportToXML' option is no longer supported and will be removed in a future release.
And I have also noticed that in the XML file the State Chart component is just mentioned, so basically I cannot see what it contains from the XML file.
So what I would like to ask is if there are other functions or ways that allow Simulink models with State Charts components to be exported in a XML format.
Thanks in advance.

댓글 수: 1

  1. save model included stateflow chart.
  2. unzip the model.
  3. show stateflow.xml.

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

답변 (1개)

Corey Lagunowich
Corey Lagunowich 2026년 2월 11일 20:54
편집: Corey Lagunowich 2026년 2월 11일 20:54

0 개 추천

Stateflow's model format is readable, but not open. You should not need to directly read or write SLX model files, as this format may change without prior notice.
What are you trying to achieve?
  1. If you want to modify your Simulink or Stateflow models, please use the Simulink and Stateflow APIs as referred in the documentation.
  2. If you're looking to improve compatibility and interoperability with git, register the SLX format following this doc page. You can use Simulink's diff and merge tools to understand what has changed between two different designs.

카테고리

도움말 센터File Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2019년 10월 26일

편집:

2026년 2월 12일 8:19

Community Treasure Hunt

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

Start Hunting!

Translated by