📄 parser.h
字号:
/**
* Parser - Parses an input stream into tree representation
* of corresponding XML
*
* @author Jonathan Roewen
*/
#ifndef PARSER_H
#define PARSER_H
#include <string>
#include <iostream>
#include <stack>
using namespace std;
#include "Element.h"
class Parser
{
public:
Parser() {
root = current = PElement(NULL);
}
PElement parse(istream &in, const string &xxx);
PElement getRoot() const;
void reset();
private:
PElement current, root;
stack<PElement> recurser;
void addElement(string &name);
void addTextElement(const string &text);
void addCDataElement(const string &text);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -