The number of bytes written to the buffer.
In the dnprdnext release, the recommended practice is to create System.Xml.XmlReader instances using the erload:System.Xml.XmlReader.Create method. This allows you to take full advantage of the new features introduced in this release. For more information, see Creating XML Readers.
This method reads the element content, decodes it using BinHex encoding, and returns the decoded binary bytes (for example, an inline BinHex encoded GIF image) into the buffer.
This method can only read simple-content elements. The element can contain text, white space, significant white space, CDATA sections, comments and processing instructions. It can also contain entity references, which are automatically expanded. The element cannot have child elements.
This method is very similar to the XmlTextReader.ReadContentAsBinHex(Byte[], int, int) method except that it can only be called on element node types.
If the count value is higher than the number of bytes in the document, or if it is equal to the number of bytes in the document, the System.Xml.XmlTextReader reads all the remaining bytes in the document and returns the number of bytes read. The next System.Xml.XmlTextReader method call returns a zero and moves the reader to the node following the XmlNodeType.EndElement.
If you call XmlTextReader.Read before all of the element content is consumed, the reader may behave as if the first content was consumed and then the XmlTextReader.Read method was called. This means that the reader reads all the text until the end element is encountered. It then reads the end tag node, reads the next node, and then positions itself on the next subsequent node.