资 源 简 介
This set of C# classes can be used to parse "HTML-like" markup. They are intended to be inherited from, rather than being used directly.
Class Descriptions
Tag
The simplest possible form of a tag. Includes the tag name, and a list of attributes.
PrimitiveTag
LiteralPrimitiveTag, CommentPrimitiveTag
A low-level representation of a tag, in HTML it would correspond to a piece of text contained between and >. Literals (text outside of
and >) and comments are also treated as tags.
ParserState
Container class that encapsulates the raw input (as a string), the output (as a list of PrimitiveTags), and includes methods for navigating the input.
Parser
This class encapsulates most of the parsing logic. Given a ParserState (which contains the raw markup as a string), it produces a collection of PrimitiveTags.
HierarchyNode
Liter
文 件 列 表
MarkupParser_Tests
DocumentHierarchyCreatorTests.cs
MarkupParser_Tests.csproj
ParserTests.cs
Properties
TagConverterTests.cs
WhiteListExample
Properties
WhiteListExample.csproj
WhiteListParser.cs
WhiteListTagConverter.cs
Properties
AssemblyInfo.cs
AssemblyInfo.cs
MarkupParser.sln
MarkupParser
AttributeDefinition.cs
AttributeValue.cs
CommentNode.cs
CommentPrimitiveTag.cs
DocumentHierarchyCreator.cs
GetHierarchyNodeMethodAttribute.cs
HierarchyNode.cs
IsSelfClosingMethodAttribute.cs
LiteralNode.cs
LiteralPrimitiveTag.cs
MarkupParser.csproj
MarkupParser.FxCop
MarkupParserKey.snk
Parser.cs
ParseState.cs
PrimitiveTag.cs
Properties
RootNode.cs
Tag.cs
TagConverter.cs