⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmlparser.hpp

📁 一个开放源代码的AVR单片机编程器
💻 HPP
字号:
/*****************************************************************************
 *
 * Atmel Corporation
 *
 * File              : XMLParser.hpp
 * Compiler          : Dev-C++ 4.9.8.0 - http://bloodshed.net/dev/
 * Revision          : $Revision: 3.0 $
 * Date              : $Date: Tuesday, January 17, 2006 18:33:56 UTC $
 * Updated by        : $Author: raapeland $
 *
 * Support mail      : avr@atmel.com
 *
 * Target platform   : Win32
 *
 * AppNote           : AVR911 - AVR Open-source Programmer
 *
 * Description       : A simple XML DOM-like parser. It builds a complete tree from
 *                     the XML file. IT supports <section/> tags, but not tag attributes.
 *
 * 
 ****************************************************************************/
#ifndef XMLPARSER_HPP
#define XMLPARSER_HPP

using namespace std;

#include "ErrorMsg.hpp"
#include "Utility.hpp"
#include <iostream>
#include <fstream>
#include <list>

class XMLAbstractNode; // Preliminary definitions.
class XMLTree;
class XMLNode;


/* Main XML file class. Contains search methods and entire XML tree */
class XMLFile
{
	protected:
		XMLTree * root; // The root node, either a subtree or an ordinary node.

		void removeComments( string & txt ); // Remove comment tags.
		void removeAttributes( string & txt ); // Remove attributes from tags.
		void readFile( const string & _filename ); // Read XML file.
		void parseFragment( string & fragment, XMLTree * parent );

	public:
		/* Constructors */
		XMLFile( const string & _filename );

		/* Destructor */
		~XMLFile();

		/* Methods */
		bool exists( const string & path ); // Checks if node exists.
		const string & getValue( const string & path ); // Get node value.

		void print();
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -