Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.



Creates an instance of IXmlReaderInput with the provided parameters. This is normally used when the input stream does not have a BOM.

HRESULT CreateXmlReaderInputWithEncodingName (  
    [in] IUnknown * pInputStream ,   
    [in] IMalloc * pMalloc,  
    [in] const WCHAR * pwszEncodingName ,  
    [in] BOOL fEncodingHint,  
    [in] const WCHAR * pwszBaseUri ,  
    [out] IXmlReaderInput ** ppInput );  

A pointer to the input stream for the reader to read the data from. This can be either an ISequentialStream or an IStream interface. It is recommended that the IStream interface be implemented for the stream even if some of its methods would return E_NOTIMPL. It is also recommended that the stat method be implemented so the size of the stream can be queried, because this can result in better performance.

This parameter cannot be NULL.

A pointer to a user-provided implementation of the IMalloc interface. The reader will use this for all memory allocation. If this parameter is NULL, the reader will use its own implementation.

Specifies the encoding of the input. The user can specify the encoding as a name of the encoding. The actual behavior of the reader depends on the fEncodingHint flag.

The value of this parameter is only considered if no BOM is available in the stream. If TRUE, the parser will attempt to use the encoding specified in pwszEncodingName. If the encoding of the file is different than that specified in pwszEncodingName, the parser will attempt to determine the encoding. If FALSE, the parser must use the encoding specified in pwszEncodingName. Any other encoding results in an error.

The base URI for this input stream. This value is passed to ResolveUri when XmlLite is resolving external entities.

The new IXmlReaderInput. This parameter cannot be NULL.

Returns S_OK if no error is generated.

Header: XmlLite.h

Library: XmlLite.lib

IXmlReader Functions

© 2017 Microsoft