📄 saxfilehandlers.h
字号:
// SAXFileHandlers.h: interface for the CSAXFileHandlers class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SAXFILEHANDLERS_H__8CDD50B2_F407_472F_9392_1B19DECE62E9__INCLUDED_)
#define AFX_SAXFILEHANDLERS_H__8CDD50B2_F407_472F_9392_1B19DECE62E9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <xercesc/sax2/Attributes.hpp>
#include <xercesc/sax2/DefaultHandler.hpp>
XERCES_CPP_NAMESPACE_USE
class CSAXFileHandlers : public DefaultHandler
{
public:
CSAXFileHandlers();
virtual ~CSAXFileHandlers();
bool Convert();
// -----------------------------------------------------------------------
// Handlers for the SAX DocumentHandler interface
// -----------------------------------------------------------------------
void startElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname, const Attributes& attrs);
void endElement(const XMLCh *const uri, const XMLCh* const localname, const XMLCh* const qname);
void characters(const XMLCh* const chars, const unsigned int length);
// -----------------------------------------------------------------------
// Handlers for the SAX ErrorHandler interface
// -----------------------------------------------------------------------
void warning(const SAXParseException& exception);
void error(const SAXParseException& exception);
void fatalError(const SAXParseException& exception);
void resetErrors();
private:
int m_nStatus;
bool m_bInAuthor;
bool m_bInDateLine;
bool m_bInTitle;
CStringArray m_astrTop10Category;
private:
short GetTopicString(CStringArray &astrToipics, CString &strTopic, bool bTop10=false);
bool IsInTop10Category(char *);
void clear();
char m_pDocID[15];
CStringArray m_astrTopics;
char m_pTitle[1024];
char m_pContent[1024*128];
public:
void writeContent();
FILE *m_pStream;
char m_pTarget[MAX_PATH];
char m_pSource[MAX_PATH];
int m_nSourceFormat;
int m_nTargetFormat;
bool m_bShowErrors;
int m_nSplitType;
int m_nDocsSetType;
int m_nCategoryNum;
};
extern CSAXFileHandlers theSaxFileHandler;
#endif // !defined(AFX_SAXFILEHANDLERS_H__8CDD50B2_F407_472F_9392_1B19DECE62E9__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -