Easily process XML data in .NET Framework (4-4)
Dec 20, 2016 pm 02:16 PM??Figure 9 String Array in Internet Explorer
??The Reader class has special methods for explaining Base64 and BinHex encoding streams. The following code snippet demonstrates how to use the ReadBase64 method of the XmlTextReader class to parse a document created with the Base64 and BinHex encoding sets.
XmlTextReader reader = new
int n = reader.ReadBase64(bytes, 0, 1000);
string buf = Encoding.Unicode.GetString(bytes);
Console.WriteLine(buf.Substring(0,n));
}
}
reader.Close();
?? Conversion from byte type to string type is achieved through the GetString method of the Encoding class. Although I only introduced the code based on the Base64 encoding set, you can simply replace the method name with BinHex to read the node content based on BinHex encoding (using the ReadBinHex method). This technique can also be used to read any binary data expressed in byte data form, especially image type data.
The above is the content of easily processing XML data (4-4) in .NET Framework. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Microsoft NET Framework Installation Issues Error Code 0x800c0006 Fix

How to identify Windows upgrade issues using SetupDiag on Windows 11/10
![SCNotification has stopped working [5 steps to fix it]](https://img.php.cn/upload/article/000/887/227/168433050522031.png?x-oss-process=image/resize,m_fill,h_207,w_330)
SCNotification has stopped working [5 steps to fix it]

Microsoft .NET Framework 4.5.2, 4.6, and 4.6.1 will end support in April 2022

What are the employment prospects of C#?

Share several .NET open source AI and LLM related project frameworks

Python implements XML data filtering and filtering

KB5012643 for Windows 11 breaks .NET Framework 3.5 apps
