getTextFromField.m
% This function is part of the NMSM Pipeline, see file for full license.
%
% This function returns the Text field from a struct, or the input if the
% input is not a struct. This is useful for parsing XML.
%
% (Any) => (char array)
% Find Text field from a struct or return the input.
function output = getTextFromField(field)
if isstruct(field)
output = field.Text;
else
output = field;
end
end