Closed sco1 closed 8 years ago
This is a holdover from the previous implementation (prior to initial commit), where the entire body of the XML file was loaded into a single character array and parsed. Because we're only looking to strip the header and footer, it was a robust enough approach to anchor the regexprep
expressions to the beginning/end of the string.
The XML parsing was swapped to a fgetl
approach into a cell array of strings to make writing the classdef
to a *.m
file simpler, as the previous approach did not pull in the appropriate line endings.
The second statement in the
regexprep
statement strips out characters following anyend
statement in the input file.Though likely not generally an issue, this is a very greedy implementation and could potentially negatively affect the user's code.