#pragma once

#include <atlbase.h>
#include <xmllite.h>
#include "windowsAPI.h"

#include "namespace_start.h"


class CXmlReader{

private:
	CComPtr<IXmlReader> m_xmlReader;

public:
	CHResult Create(REFIID riid = __uuidof(IXmlReader),IMalloc *pMalloc = nullptr);

	CHResult SetInput(IStream *pStream);

	CHResult Read(XmlNodeType *pXmlNodeType);


	CHResult GetLocalName(const NChar **ppLocalName,UInt *pLocalNameLen = nullptr);

	CHResult GetValue(const NChar **ppValue,UInt *pValueLen = nullptr);

	CHResult MoveToFirstAttribute();

};



#include "namespace_end.h"