Xml does not support binary data, you need to convert it to text format because Xml is used as a massage format. Do you need smth. eg:
string text = System.Text.Encoding.UTF8.GetString(data);
Here is the link: binary-xml
byte[] binaryData; try { binaryData = System.Convert.FromBase64String(base64String); }
This is an alternative for XmlReader. Check out this link: alternative
The declaration, if you adhere to XmlReader, will try to implement this:
writer.WriteStartElement("Image"); writer.WriteBase64(fileData[1], 0, fileData[1].Length);
Also see this: stack discussion
I'm not sure if this will help you. Not much has been experienced, but I'm glad if this helps.
Harun Δerim
source share