We need to load the attachments (for example, a text document) into an xml file. Is there any way to attach this? Any sample code using C # would be appreciated.
Take a look at this article: http://www.codeproject.com/KB/XML/xml_serializationasp.aspx it describes how to save BMP images in xml and from them by converting them into byte arrays. I suspect a similar method will work for other files as well.
An alternative is to save the uri of the resource, rather than trying to include it in XML.
<?xml version="1.0"?> <item> <attachment type="word">http://path.to/document</attachment> </item>
- , unencode, , .
Source: https://habr.com/ru/post/1781908/More articles:is Windows user space file system the best option? - cexpected program - cHow does this work with win-win text fields? - c #sql server 2005/2008 conditional connection - tsqlUnderstanding OOP principles when traversing objects / values - oopWhat should be my SSH GitHub key? - version-controlBest data type for storing html css javascript - c #jQuery TimePicker and jQueryUI 1.8.7 conflict - jqueryRequires HTTP status (200/500 / etc). Code from WebBrowser Control - c #Write the longest cycle possible - computer-scienceAll Articles