XmlDeclarationToken
Represents the XML declaration <?xml ...?>
namespace AngleSharp.Parser.Xml
{
internal sealed class XmlDeclarationToken : XmlToken
{
private string _version;
private string _encoding;
private bool _standalone;
public string Version {
get {
return _version;
}
set {
_version = value;
}
}
public bool IsEncodingMissing => _encoding == null;
public string Encoding {
get {
return _encoding ?? string.Empty;
}
set {
_encoding = value;
}
}
public bool Standalone {
get {
return _standalone;
}
set {
_standalone = value;
}
}
public XmlDeclarationToken(TextPosition position)
: base(XmlTokenType.Declaration, position)
{
_version = string.Empty;
_encoding = null;
_standalone = false;
}
}
}