mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
add reopen the existed memory in lightreader
This commit is contained in:
@ -95,6 +95,8 @@ namespace XmlUtils
|
|||||||
bool FromString (const std::wstring& sXml);
|
bool FromString (const std::wstring& sXml);
|
||||||
bool FromStringA(const std::string& sXml);
|
bool FromStringA(const std::string& sXml);
|
||||||
|
|
||||||
|
bool MoveToStart();
|
||||||
|
|
||||||
bool Read(XmlNodeType &oNodeType);
|
bool Read(XmlNodeType &oNodeType);
|
||||||
bool ReadNextNode();
|
bool ReadNextNode();
|
||||||
bool ReadNextSiblingNode(int nDepth);
|
bool ReadNextSiblingNode(int nDepth);
|
||||||
|
|||||||
@ -111,6 +111,10 @@ namespace XmlUtils
|
|||||||
{
|
{
|
||||||
return m_pInternal->FromStringA(sXml);
|
return m_pInternal->FromStringA(sXml);
|
||||||
}
|
}
|
||||||
|
bool CXmlLiteReader::MoveToStart()
|
||||||
|
{
|
||||||
|
return m_pInternal->MoveToStart();
|
||||||
|
}
|
||||||
|
|
||||||
bool CXmlLiteReader::Read(XmlNodeType &oNodeType)
|
bool CXmlLiteReader::Read(XmlNodeType &oNodeType)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -130,6 +130,18 @@ namespace XmlUtils
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool MoveToStart()
|
||||||
|
{
|
||||||
|
if (NULL != reader)
|
||||||
|
xmlFreeTextReader(reader);
|
||||||
|
|
||||||
|
if (NULL == m_pStream)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
reader = xmlReaderForMemory((char*)m_pStream, m_lStreamLen, NULL, NULL, 0);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
inline bool Read(XmlNodeType &oNodeType)
|
inline bool Read(XmlNodeType &oNodeType)
|
||||||
{
|
{
|
||||||
if (!IsValid())
|
if (!IsValid())
|
||||||
|
|||||||
Reference in New Issue
Block a user