Read binary hex value
Option Explicit Option Strict Imports System Imports System.IO Imports System.Xml Imports Microsoft.VisualBasic Public Class Sample Private Const filename As String = "binary.xml" Public Shared Sub Main() Dim reader As XmlTextReader = Nothing Dim i As Integer reader = New XmlTextReader(filename) reader.WhitespaceHandling = WhitespaceHandling.None While reader.Read() If "Base64" = reader.Name Then Exit While End If End While Dim binhexlen As Integer = 0 Dim binhex(1000) As Byte binhexlen = reader.ReadBinHex(binhex, 0, 50) Do binhexlen = reader.ReadBinHex(binhex, 0, 50) For i = 0 To binhexlen - 1 Console.Write(binhex(i)) Next i Loop While (reader.Name = "BinHex") End Sub 'Main End Class