0

I'm looking for any advice or ideas on generating XML from Simulink.

I have a some bespoke hardware from a supplier that I can load custom apps onto. The app must be written in a defined XML schema. I have the schema definition, but I don't have access to the tools to generate the XML so I want to develop my own using Simulink to define the logic and export it to XML. Does anyone have any ideas on the best way to go about this?

The only way I can think of doing this is to create/save the Simulink and parse the mdl/slx file into XML. Does anyone know of any tools or resources that may help here? I found this in the course of my diggings. Any other ideas?

Thanks

Ben
  • 427
  • 5
  • 17
  • What's wrong with the link which you have already seen ? – P0W Jan 16 '18 at 10:44
  • That just dumps the model to MathWorks' own XML schema, which describe the entire model (solvers, fonts, window settings, colours, etc). I need to the model to be written to my own schema, which is readable by the hardware I want to execute the app on. – Ben Jan 16 '18 at 10:50
  • Well it dumps the entire models with attached configuration set. Whatever hardware/tools that renders this xml has to be complaint to this xml schema else you'll have to preprocess this xml, before feeding it to your tool/hardware. – P0W Jan 16 '18 at 10:55
  • I'll need to convert to the non MathWorks XML schema. It sounds like this is the best and only way to go. Do you know of any existing parsers of the MathWorks schema that could give me objects in memory or similar? That would get me half way there. I'm only just having a search for these now. If not I'll just write my own. – Ben Jan 16 '18 at 11:04
  • May be try [this](https://in.mathworks.com/help/matlab/ref/xmlread.html) ? – P0W Jan 16 '18 at 11:07
  • Is there not a cleaner, more direct method? Here we're creating a model, exporting it to MathWorks XML and rereading it back into Matlab. Is there a method of working with the model directly and exporting straight to the custom XML schema? – Ben Jan 16 '18 at 11:16

0 Answers0