Moves XNA 4 files for Github migration.
This commit is contained in:
39
Plan B Html Parser/Tokens/HtmlToken.cs
Normal file
39
Plan B Html Parser/Tokens/HtmlToken.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace PlanB.Html.Tokens
|
||||
{
|
||||
internal class HtmlToken
|
||||
{
|
||||
public List<KeyValuePair<string, string>> Attributes { get; set; }
|
||||
|
||||
public HtmlToken()
|
||||
{
|
||||
Attributes = new List<KeyValuePair<string, string>>();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
internal void AddAttributes(Match m)
|
||||
{
|
||||
Group attributeNameGroup = m.Groups["attributeName"];
|
||||
Group attributeValueGroup = m.Groups["attributeValue"];
|
||||
|
||||
//int numAttributes = m.Groups["attributeName"].Captures.Count;
|
||||
int numAttributes = attributeNameGroup.Captures.Count;
|
||||
|
||||
for (int i = 0; i < numAttributes; i++)
|
||||
{
|
||||
//KeyValuePair<string, string> attribute = new KeyValuePair<string, string>(m.Groups["attributeName"].Captures[i].ToString(), m.Groups["attributeValue"].Captures[i].ToString());
|
||||
KeyValuePair<string, string> attribute = new KeyValuePair<string, string>(attributeNameGroup.Captures[i].ToString(), attributeValueGroup.Captures[i].ToString());
|
||||
Attributes.Add(attribute);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user