ReadElementContentAsBase64()

XmlReader::ReadElementContentAsBase64(ArrayPtr<uint8_t>, int32_t, int32_t) method

Reads the element and decodes the Base64 content.

virtual int32_t System::Xml::XmlReader::ReadElementContentAsBase64(ArrayPtr<uint8_t> buffer, int32_t index, int32_t count)

Arguments

ParameterTypeDescription
bufferArrayPtr<uint8_t>The buffer into which to copy the resulting text. This value cannot be nullptr.
indexint32_tThe offset into the buffer where to start copying the result.
countint32_tThe maximum number of bytes to copy into the buffer. The actual number of bytes copied is returned from this method.

Return Value

The number of bytes written to the buffer.

Exceptions

ExceptionDescription
ArgumentNullExceptionThe buffer value is nullptr.
InvalidOperationExceptionThe current node is not an element node.
ArgumentOutOfRangeExceptionThe index into the buffer or index + count is larger than the allocated buffer size.
NotSupportedExceptionThe XmlReader implementation does not support this method.
XmlExceptionThe element contains mixed-content.
FormatExceptionThe content cannot be converted to the requested type.

See Also