Little Registry Cleaner/XML Registry/xmlReader.cs

(开头部分) 14KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
    Little Registry Cleaner
    Copyright (C) 2008 Little Apps (http://www.little-apps.org/)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

using System;
using System.IO;
using System.Windows.Forms;

public enum NODETYPE
{
	NODETYPE_NA = 0,
	NODETYPE_BEGINELEMENT = 1,
	NODETYPE_ENDELEMENT = 2,
	NODETYPE_ATTRIB = 3,
	NODETYPE_CONTENT = 4,
	NODETYPE_PI = 5,
	NODETYPE_COMMENT = 6,
	NODETYPE_CDATA = 7
};

namespace Little_Registry_Cleaner.Xml
{
	/// <summary>
	/// xmlReader reads and parses an XML file
	/// </summary>
	public class xmlReader
	{
		public const string IDS_EMPTYELEMENTNAME = "Empty element name";
		public const string IDS_BADBEGINNODESYMBOL = "Bad '<' symbol";
		public const string IDS_NOBEGINNODESYMBOLINEOL = "'<' symbol not allowed at the end of a line";
		public const string IDS_GENERICSYNTAXERROR = "Syntax error";
		public const string IDS_MISSINGATTRIBNAME = "Missing attribute name before '='";
		public const string IDS_MISSINGEQUALSYMBOL = "Missing '=' after attribute name";
		public const string IDS_NOEQUALSYMBOLINEOL = "There should not be a '=' symbol at the end of a line";
		public const string IDS_BADATTRIBUTEVALUESYNTAX = "There should not be a quote char at the end of a line";

		StreamReader _sr; // general file members
		bool		_bFileOpen;
		string		_strFilename;
        bool        _bShowMsgBoxOnError; // true if message boxes are allowed to display while parsing
		string		_strLastError; // filled with error description if ParseContent() returns false

		//
		string		_strContent; // internal use : parser buffer
		int		_nCursor, _nbLines; // internal cursors (horizontal and vertical directions)
		NODETYPE	_nCurNodeType; // returns where is the parser on at the moment
后面还有 526 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。