Sreedhar
Sreedhar

Reputation: 30035

Linq to XML - way to write binary Data into XML

How to write binary data into XML using LINQ which is being read from registery.

Eg: ήì\ÎQÝÜ$Ñ.Ì6Å·xxµ0©ÐQfô:S9}:&......

Upvotes: 0

Views: 742

Answers (2)

Jon Skeet
Jon Skeet

Reputation: 1502106

I think the simplest way is to base64 encode the data and then set it as element text. Convert.ToBase64String and Convert.FromBase64String should get you started.

Upvotes: 1

Jeff Mattfield
Jeff Mattfield

Reputation:

Use something like Base64 encoding to convert the binary into characters acceptable for XML.

Upvotes: 2

Related Questions