November Happy Hour will be moved to Thursday December 5th.

Class SgmlReader

SgmlReader is an XmlReader API over any SGML document (including built in support for HTML).

Inheritance
System.Object
SgmlReader
Namespace: Sgml
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class SgmlReader : XmlReader

Constructors

SgmlReader()

Declaration
public SgmlReader()

SgmlReader(XmlNameTable)

Declaration
public SgmlReader(XmlNameTable nt)
Parameters
Type Name Description
System.Xml.XmlNameTable nt

Properties

AttributeCount

Declaration
public override int AttributeCount { get; }
Property Value
Type Description
System.Int32

BaseURI

Declaration
public override string BaseURI { get; }
Property Value
Type Description
System.String

CaseFolding

Declaration
public CaseFolding CaseFolding { get; set; }
Property Value
Type Description
CaseFolding

Depth

Declaration
public override int Depth { get; }
Property Value
Type Description
System.Int32

DocType

The name of root element specified in the DOCTYPE tag.

Declaration
public string DocType { get; set; }
Property Value
Type Description
System.String

Dtd

Specify the SgmlDtd object directly. This allows you to cache the Dtd and share it across multipl SgmlReaders. To load a DTD from a URL use the SystemLiteral property.

Declaration
public SgmlDtd Dtd { get; set; }
Property Value
Type Description
SgmlDtd

EOF

Declaration
public override bool EOF { get; }
Property Value
Type Description
System.Boolean

ErrorLog

DTD validation errors are written to this stream.

Declaration
public TextWriter ErrorLog { get; set; }
Property Value
Type Description
System.IO.TextWriter

ErrorLogFile

DTD validation errors are written to this log file.

Declaration
public string ErrorLogFile { get; set; }
Property Value
Type Description
System.String

HasValue

Declaration
public override bool HasValue { get; }
Property Value
Type Description
System.Boolean

Href

Specify the location of the input SGML document as a URL.

Declaration
public string Href { get; set; }
Property Value
Type Description
System.String

InputStream

The input stream containing SGML data to parse. You must specify this property or the Href property before calling Read().

Declaration
public TextReader InputStream { get; set; }
Property Value
Type Description
System.IO.TextReader

InternalSubset

The DTD internal subset in the DOCTYPE tag

Declaration
public string InternalSubset { get; set; }
Property Value
Type Description
System.String

IsDefault

Declaration
public override bool IsDefault { get; }
Property Value
Type Description
System.Boolean

IsEmptyElement

Declaration
public override bool IsEmptyElement { get; }
Property Value
Type Description
System.Boolean

Item[Int32]

Declaration
public override string this[int i] { get; }
Parameters
Type Name Description
System.Int32 i
Property Value
Type Description
System.String

Item[String]

Declaration
public override string this[string name] { get; }
Parameters
Type Name Description
System.String name
Property Value
Type Description
System.String

Item[String, String]

Declaration
public override string this[string name, string namespaceURI] { get; }
Parameters
Type Name Description
System.String name
System.String namespaceURI
Property Value
Type Description
System.String

LocalName

Declaration
public override string LocalName { get; }
Property Value
Type Description
System.String

Name

Declaration
public override string Name { get; }
Property Value
Type Description
System.String

NamespaceURI

Declaration
public override string NamespaceURI { get; }
Property Value
Type Description
System.String

NameTable

Declaration
public override XmlNameTable NameTable { get; }
Property Value
Type Description
System.Xml.XmlNameTable

NodeType

Declaration
public override XmlNodeType NodeType { get; }
Property Value
Type Description
System.Xml.XmlNodeType

Prefix

Declaration
public override string Prefix { get; }
Property Value
Type Description
System.String

PublicIdentifier

The PUBLIC identifier in the DOCTYPE tag

Declaration
public string PublicIdentifier { get; set; }
Property Value
Type Description
System.String

QuoteChar

Declaration
public override char QuoteChar { get; }
Property Value
Type Description
System.Char

ReadState

Declaration
public override ReadState ReadState { get; }
Property Value
Type Description
System.Xml.ReadState

StripDocType

Whether to strip out the DOCTYPE tag from the output (default true)

Declaration
public bool StripDocType { get; set; }
Property Value
Type Description
System.Boolean

SystemLiteral

The SYSTEM literal in the DOCTYPE tag identifying the location of the DTD.

Declaration
public string SystemLiteral { get; set; }
Property Value
Type Description
System.String

Value

Declaration
public override string Value { get; }
Property Value
Type Description
System.String

WebProxy

Sometimes you need to specify a proxy server in order to load data via HTTP from outside the firewall. For example: "itgproxy:80".

Declaration
public string WebProxy { get; set; }
Property Value
Type Description
System.String

WhitespaceHandling

Declaration
public WhitespaceHandling WhitespaceHandling { get; set; }
Property Value
Type Description
System.Xml.WhitespaceHandling

XmlLang

Declaration
public override string XmlLang { get; }
Property Value
Type Description
System.String

XmlSpace

Declaration
public override XmlSpace XmlSpace { get; }
Property Value
Type Description
System.Xml.XmlSpace

Methods

Close()

Declaration
public override void Close()

GetAttribute(Int32)

Declaration
public override string GetAttribute(int i)
Parameters
Type Name Description
System.Int32 i
Returns
Type Description
System.String

GetAttribute(String)

Declaration
public override string GetAttribute(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
System.String

GetAttribute(String, String)

Declaration
public override string GetAttribute(string name, string namespaceURI)
Parameters
Type Name Description
System.String name
System.String namespaceURI
Returns
Type Description
System.String

GetEncoding()

Declaration
public Encoding GetEncoding()
Returns
Type Description
System.Text.Encoding

LookupNamespace(String)

Declaration
public override string LookupNamespace(string prefix)
Parameters
Type Name Description
System.String prefix
Returns
Type Description
System.String

MoveToAttribute(Int32)

Declaration
public override void MoveToAttribute(int i)
Parameters
Type Name Description
System.Int32 i

MoveToAttribute(String)

Declaration
public override bool MoveToAttribute(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
System.Boolean

MoveToAttribute(String, String)

Declaration
public override bool MoveToAttribute(string name, string ns)
Parameters
Type Name Description
System.String name
System.String ns
Returns
Type Description
System.Boolean

MoveToElement()

Declaration
public override bool MoveToElement()
Returns
Type Description
System.Boolean

MoveToFirstAttribute()

Declaration
public override bool MoveToFirstAttribute()
Returns
Type Description
System.Boolean

MoveToNextAttribute()

Declaration
public override bool MoveToNextAttribute()
Returns
Type Description
System.Boolean

Read()

Declaration
public override bool Read()
Returns
Type Description
System.Boolean

ReadAttributeValue()

Declaration
public override bool ReadAttributeValue()
Returns
Type Description
System.Boolean

ReadInnerXml()

Declaration
public override string ReadInnerXml()
Returns
Type Description
System.String

ReadOuterXml()

Declaration
public override string ReadOuterXml()
Returns
Type Description
System.String

ReadString()

Declaration
public override string ReadString()
Returns
Type Description
System.String

ResolveEntity()

Declaration
public override void ResolveEntity()

ScanLiteral(AppendOnlyBuilder, Char)

Declaration
public string ScanLiteral(AppendOnlyBuilder sb, char quote)
Parameters
Type Name Description
AppendOnlyBuilder sb
System.Char quote
Returns
Type Description
System.String

SetBaseUri(String)

The base Uri is used to resolve relative Uri's like the SystemLiteral and Href properties. This is a method because BaseURI is a read-only property on the base XmlReader class.

Declaration
public void SetBaseUri(string uri)
Parameters
Type Name Description
System.String uri

Extension Methods