enter image description here I process xml-documents using XmlDocument
in C#:
XmlDocument xml = new XmlDocument ();
xml.Load(file);
I have faced the following problem:
In a number of documents there is a special symbol: §
(it is a symbol §
)
It isn't distinguished while processing and so the document doesn't open in Word. (Word error when processing the XML file. Inadmissible sign XML)
It would be desirable that after processing symbols §
remained on the places.
May be someone know how to solve this problem?
This is a detailed microsoft article on how to do this. Essentially you will need to load the xml file and replace the special characters using StreamWriter.
The §
is not symbol §
The §
is symbol §
The xml file will ivalid if there is something like §
. It have to be §
One of possible solution is read the file just like a text then replace all §
to §
, save and finally open it as xml
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.