writeXml adds &#xD to the end of the output file, which is not a part of the data. Tips to remove?

5 views (last 30 days)
writeXml(xmltargetdir, xmlData.Name, xmlData, '1D');
xmlData.Name contains a cell array of different strings. For now its all called Random Text.
As shown here, the output contains &#xD which is not in the data. Would like some tips to cut it out of the output.

Accepted Answer

Walter Roberson
Walter Roberson on 28 Apr 2023
#xD; is carriage return. Is it possible that you are reading a file that was created in Windows, and splitting up text, but that you are not removing carriage returns when you do so?
  1 Comment
TV8
TV8 on 2 May 2023
Thanks a ton Walter. I did find a stray character in the output of a strsplit before. Using the tempsplit = strsplit(temp,{';','\r'}); helped to take the carraige return out. Thanks for the help.

Sign in to comment.

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!