Will not publish to pdf
135 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Error reported by XML parser: An invalid XML character (Unicode: 0x1a) was found in the element content of the document.
Error using publish
.m file must contain valid XML 1.0 Standard characters.
Error in mdbpublish (line 54)
outputPath = publish(file, options);
Error using open (line 52)
File or variable name must be a character vector or string scalar.
My file name does not have any spaces and neither do any of the names of the path. I am unsure what is causing this.
0 Kommentare
Antworten (1)
Shanmukha Voggu
am 1 Sep. 2021
Hi Kevin,
It is likely there is a special character somewhere in your file. If you are able to run the file without any issues, it is likely somewhere in the comments.
Attached is an example of an M file with a special character in its comments.
If you cannot find a special character in your file, another thing to check would be any places where "char" is called on a number. The way "char" function works is to create unicode commands of the numbers, so this is an easy way to generate invalid XML characters. For example:
char(20)
For converting numbers to characters it is recommended to use "num2str" instead of "char":
num2str(20)
0 Kommentare
Siehe auch
Kategorien
Mehr zu String Parsing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!