Home Backend Development C#.Net Tutorial Easily process XML data in .NET Framework (4-4)

Easily process XML data in .NET Framework (4-4)

Dec 20, 2016 pm 02:16 PM
.net framework xml data

??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)!




Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Microsoft NET Framework Installation Issues Error Code 0x800c0006 Fix Microsoft NET Framework Installation Issues Error Code 0x800c0006 Fix May 05, 2023 pm 04:01 PM

Microsoft NET Framework Installation Issues Error Code 0x800c0006 Fix

How to identify Windows upgrade issues using SetupDiag on Windows 11/10 How to identify Windows upgrade issues using SetupDiag on Windows 11/10 Apr 17, 2023 am 10:07 AM

How to identify Windows upgrade issues using SetupDiag on Windows 11/10

SCNotification has stopped working [5 steps to fix it] SCNotification has stopped working [5 steps to fix it] May 17, 2023 pm 09:35 PM

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 Microsoft .NET Framework 4.5.2, 4.6, and 4.6.1 will end support in April 2022 Apr 17, 2023 pm 02:25 PM

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#? What are the employment prospects of C#? Oct 19, 2023 am 11:02 AM

What are the employment prospects of C#?

Share several .NET open source AI and LLM related project frameworks Share several .NET open source AI and LLM related project frameworks May 06, 2024 pm 04:43 PM

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

Python implements XML data filtering and filtering Python implements XML data filtering and filtering Aug 09, 2023 am 10:13 AM

Python implements XML data filtering and filtering

KB5012643 for Windows 11 breaks .NET Framework 3.5 apps KB5012643 for Windows 11 breaks .NET Framework 3.5 apps May 09, 2023 pm 01:07 PM

KB5012643 for Windows 11 breaks .NET Framework 3.5 apps

See all articles