NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlReader.ReadChars

Reads the text contents of an element into a character buffer. This method is designed to read large streams of embedded text by calling it successively.

[Visual Basic]
MustOverride Public Function ReadChars( _
   ByVal buffer() As Char, _
   ByVal index As Integer, _
   ByVal count As Integer _
) As Integer
[C#]
public abstract int ReadChars(
   char[] buffer,
   int index,
   int count
);
[C++]
public: virtual int ReadChars(
   __wchar_t* buffer[],
   int index,
   int count
) = 0;
[JScript]
public abstract function ReadChars(
   buffer : Char[],
   index : int,
   count : int
) : int;

Parameters

buffer
The array of characters that serves as the buffer to which the text contents are written.
index
[To be supplied.]
count
[To be supplied.]

Return Value

The number of characters read. This can be zero if there is no more text content to return in the current context.

Remarks

This is the most efficient way to process very large streams of text embedded in an XML document as opposed to allocating large String objects. This method returns text content a buffer at a time. For example, suppose you have the following element:

See Also

XmlReader Class | XmlReader Members | System.NewXml Namespace