Error in XML file

17 ビュー (過去 30 日間)
Kash Costello
Kash Costello 2020 年 2 月 4 日
回答済み: Jeremy Hughes 2020 年 2 月 4 日
Hi, I'm having problem with my XML file. It says:
An invalid XML character (Unicode: 0x1) was found in the element content of the document.
I can only view the <0x01> error when using Sublime Text but when I open it in notepad, it's just a space. When I read it in matlab using textscan, it's also just a space so I can't see what's the special character is. Is there a way to fix this? It would be a really great help.
Thank you so much!

回答 (1 件)

Jeremy Hughes
Jeremy Hughes 2020 年 2 月 4 日
You could try
fid = fopen(fname);
bytes = fread(fid);
fclose(fid);
find(bytes==1)
If that doesn't find anything, then it may be related to the encoding.
Many things look like a space, by the way.
char(1)
for example. You can try casting to double to see the values of each character.

カテゴリ

Help Center および File ExchangeText Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by