mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-18 23:25:17 +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 FromStringA(const std::string& sXml);
|
||||
|
||||
bool MoveToStart();
|
||||
|
||||
bool Read(XmlNodeType &oNodeType);
|
||||
bool ReadNextNode();
|
||||
bool ReadNextSiblingNode(int nDepth);
|
||||
|
||||
@ -111,6 +111,10 @@ namespace XmlUtils
|
||||
{
|
||||
return m_pInternal->FromStringA(sXml);
|
||||
}
|
||||
bool CXmlLiteReader::MoveToStart()
|
||||
{
|
||||
return m_pInternal->MoveToStart();
|
||||
}
|
||||
|
||||
bool CXmlLiteReader::Read(XmlNodeType &oNodeType)
|
||||
{
|
||||
|
||||
@ -130,6 +130,18 @@ namespace XmlUtils
|
||||
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)
|
||||
{
|
||||
if (!IsValid())
|
||||
|
||||
Reference in New Issue
Block a user