14 private readonly
string fullName;
15 private readonly
string localName;
16 private readonly
string prefix;
17 private readonly
bool hasPrefix;
18 private string @value;
33 SplitName(Name, out this.prefix, out this.localName, out this.hasPrefix);
51 SplitName(Name, out this.prefix, out this.localName, out this.hasPrefix);
66 string Name,
string Value)
69 SplitName(Name, out this.prefix, out this.localName, out this.hasPrefix);
85 SplitName(Name, out this.prefix, out this.localName, out this.hasPrefix);
113 if (this.segments is
null)
116 this.segments.
Add(Segment);
120 internal bool HasSegments => !(this.segments is
null);
129 if (this.@value is
null)
131 if (!(this.segments is
null))
133 StringBuilder sb =
new StringBuilder();
135 foreach (
HtmlNode N
in this.segments)
136 sb.Append(N.ToString());
138 this.@value = sb.ToString();
141 this.@value =
string.Empty;
150 this.segments =
null;
158 return this.prefix +
":" + this.localName +
"=" + this.
Value;
160 return this.localName +
"=" + this.
Value;
168 public override void Export(XmlWriter Output, Dictionary<string, string> Namespaces)
172 if (Namespaces.TryGetValue(
this.prefix, out
string Namespace))
173 Output.WriteAttributeString(this.prefix, this.localName, Namespace, this.@value);
176 Output.WriteAttributeString(this.localName, this.@value);
183 public override void Export(StringBuilder Output)
186 Output.Append(this.fullName);
187 Output.Append(
"=\"");
188 Output.Append(Xml.XML.Encode(
this.@value));
override void Export(XmlWriter Output, Dictionary< string, string > Namespaces)
Exports the HTML document to XML.
string Prefix
Attribute prefix.
HtmlAttribute(HtmlDocument Document, HtmlElement Parent, int StartPosition, int EndPosition, string Name, string Value)
HTML attribute
bool HasPrefix
If the attribute has a prefix.
HtmlAttribute(HtmlDocument Document, HtmlElement Parent, int StartPosition, string Name)
HTML attribute
string LocalName
Attribute local name.
string FullName
Attribute full name (including prefix).
override string ToString()
HtmlAttribute(HtmlDocument Document, HtmlElement Parent, int StartPosition, string Name, string Value)
HTML attribute
string Value
Attribute value.
override void Export(StringBuilder Output)
Exports the HTML document to XML.
HtmlAttribute(HtmlDocument Document, HtmlElement Parent, int StartPosition, int EndPosition, string Name)
HTML attribute
Base class for all HTML elements.
Base class for all HTML nodes.
int StartPosition
Start position of element.
static void SplitName(string FullName, out string Prefix, out string LocalName, out bool HasPrefix)
Splits a full name into a prefix (if available) and a local name.
HtmlDocument Document
HTML Document
HtmlNode Parent
Parent node, if available.
int EndPosition
End position of element.
A chunked list is a linked list of chunks of objects of type T .
void Add(T Item)
Adds an item to the collection.