필터 지우기
필터 지우기

Error in XML file

조회 수: 5 (최근 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 CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by