C# Класс Sgml.SgmlReader

SgmlReader is an XmlReader API over any SGML document (including built in support for HTML).
Наследование: XmlReader
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ExpandEntity void
GetEncoding System.Text.Encoding
Init void
LazyLoadDtd void
Log void
Log void
OpenInput void
ParseAspNet bool
ParseCData bool
ParseComment bool
ParseConditionalBlock bool
ParseDocType void
ParseEndTag bool
ParseMarkup bool
ParsePI bool
ParseStartTag bool
ParseTag bool
ParseText bool
Pop void
Push Node
Push Node
ScanLiteral string
ScanName string
SwapTopNodes void
Top Node
ValidAttributeName bool
Validate void
ValidateAttribute void
ValidateContent void
VerifyName bool
this string

Открытые методы

Метод Описание
GetAttribute ( int i ) : string

Gets the value of the attribute with the specified index.

GetAttribute ( string name ) : string

Gets the value of an attribute with the specified Name.

GetAttribute ( string name, string namespaceURI ) : string

Gets the value of the attribute with the specified LocalName and NamespaceURI.

LookupNamespace ( string prefix ) : string

Resolves a namespace prefix in the current element's scope.

MoveToAttribute ( string name ) : bool

Moves to the atttribute with the specified Name.

MoveToAttribute ( string name, string ns ) : bool

Moves to the attribute with the specified LocalName and NamespaceURI.

MoveToAttribute ( int i ) : void

Moves to the attribute with the specified index.

MoveToElement ( ) : bool

Moves to the element that contains the current attribute node.

MoveToFirstAttribute ( ) : bool

Moves to the first attribute.

MoveToNextAttribute ( ) : bool

Moves to the next attribute.

If the current node is an element node, this method is equivalent to MoveToFirstAttribute. If MoveToNextAttribute returns true, the reader moves to the next attribute; otherwise, the position of the reader does not change.

Read ( ) : bool

Reads the next node from the stream.

ReadAttributeValue ( ) : bool

Parses the attribute value into one or more Text, EntityReference, or EndEntity nodes.

ReadInnerXml ( ) : string

Reads all the content, including markup, as a string.

ReadOuterXml ( ) : string

Reads the content, including markup, representing this node and all its children.

ReadString ( ) : string

Reads the contents of an element or text node as a string.

ResolveEntity ( ) : void

Resolves the entity reference for EntityReference nodes.

SetBaseUri ( string uri ) : void

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.

SgmlReader ( ) : System

Initialises a new instance of the SgmlReader class.

SgmlReader ( XmlNameTable nt ) : System

Initialises a new instance of the SgmlReader class with an existing XmlNameTable, which is NOT used.

this ( int i ) : string

Gets the value of the attribute with the specified index.

this ( string name ) : string

Gets the value of an attribute with the specified Name.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Changes the ReadState to Closed.

Приватные методы

Метод Описание
ExpandEntity ( StringBuilder sb, char terminator ) : void
GetEncoding ( ) : Encoding
Init ( ) : void
LazyLoadDtd ( Uri baseUri ) : void
Log ( string msg ) : void
Log ( string msg, char ch ) : void
OpenInput ( ) : void
ParseAspNet ( ) : bool
ParseCData ( ) : bool
ParseComment ( ) : bool
ParseConditionalBlock ( ) : bool
ParseDocType ( ) : void
ParseEndTag ( ) : bool
ParseMarkup ( ) : bool
ParsePI ( ) : bool
ParseStartTag ( char ch ) : bool
ParseTag ( char ch ) : bool
ParseText ( char ch, bool newtext ) : bool
Pop ( ) : void
Push ( Node n ) : Node
Push ( string name, System.Xml.XmlNodeType nt, string value ) : Node
ScanLiteral ( StringBuilder sb, char quote ) : string

Consumes and returns a literal block of text, expanding entities as it does so.

This version is slightly different from Entity.ScanLiteral in that it also expands entities.

ScanName ( string terminators ) : string
SwapTopNodes ( ) : void
Top ( ) : Node
ValidAttributeName ( string name ) : bool
Validate ( Node node ) : void
ValidateAttribute ( Node node, Attribute a ) : void
ValidateContent ( Node node ) : void
VerifyName ( string name ) : bool
this ( string name, string namespaceURI ) : string

Описание методов

Dispose() защищенный Метод

Changes the ReadState to Closed.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

GetAttribute() публичный Метод

Gets the value of the attribute with the specified index.
public GetAttribute ( int i ) : string
i int The index of the attribute.
Результат string

GetAttribute() публичный Метод

Gets the value of an attribute with the specified Name.
public GetAttribute ( string name ) : string
name string The name of the attribute to retrieve.
Результат string

GetAttribute() публичный Метод

Gets the value of the attribute with the specified LocalName and NamespaceURI.
public GetAttribute ( string name, string namespaceURI ) : string
name string The local name of the attribute.
namespaceURI string The namespace URI of the attribute.
Результат string

LookupNamespace() публичный Метод

Resolves a namespace prefix in the current element's scope.
public LookupNamespace ( string prefix ) : string
prefix string The prefix whose namespace URI you want to resolve. To match the default namespace, pass an empty string.
Результат string

MoveToAttribute() публичный Метод

Moves to the atttribute with the specified Name.
public MoveToAttribute ( string name ) : bool
name string The qualified name of the attribute.
Результат bool

MoveToAttribute() публичный Метод

Moves to the attribute with the specified LocalName and NamespaceURI.
public MoveToAttribute ( string name, string ns ) : bool
name string The local name of the attribute.
ns string The namespace URI of the attribute.
Результат bool

MoveToAttribute() публичный Метод

Moves to the attribute with the specified index.
public MoveToAttribute ( int i ) : void
i int The index of the attribute to move to.
Результат void

MoveToElement() публичный Метод

Moves to the element that contains the current attribute node.
public MoveToElement ( ) : bool
Результат bool

MoveToFirstAttribute() публичный Метод

Moves to the first attribute.
public MoveToFirstAttribute ( ) : bool
Результат bool

MoveToNextAttribute() публичный Метод

Moves to the next attribute.
If the current node is an element node, this method is equivalent to MoveToFirstAttribute. If MoveToNextAttribute returns true, the reader moves to the next attribute; otherwise, the position of the reader does not change.
public MoveToNextAttribute ( ) : bool
Результат bool

Read() публичный Метод

Reads the next node from the stream.
public Read ( ) : bool
Результат bool

ReadAttributeValue() публичный Метод

Parses the attribute value into one or more Text, EntityReference, or EndEntity nodes.
public ReadAttributeValue ( ) : bool
Результат bool

ReadInnerXml() публичный Метод

Reads all the content, including markup, as a string.
public ReadInnerXml ( ) : string
Результат string

ReadOuterXml() публичный Метод

Reads the content, including markup, representing this node and all its children.
public ReadOuterXml ( ) : string
Результат string

ReadString() публичный Метод

Reads the contents of an element or text node as a string.
public ReadString ( ) : string
Результат string

ResolveEntity() публичный Метод

Resolves the entity reference for EntityReference nodes.
SgmlReader does not resolve or return entities.
public ResolveEntity ( ) : void
Результат void

SetBaseUri() публичный Метод

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.
public SetBaseUri ( string uri ) : void
uri string
Результат void

SgmlReader() публичный Метод

Initialises a new instance of the SgmlReader class.
public SgmlReader ( ) : System
Результат System

SgmlReader() публичный Метод

Initialises a new instance of the SgmlReader class with an existing XmlNameTable, which is NOT used.
public SgmlReader ( XmlNameTable nt ) : System
nt System.Xml.XmlNameTable The nametable to use.
Результат System

this() публичный Метод

Gets the value of the attribute with the specified index.
public this ( int i ) : string
i int The index of the attribute.
Результат string

this() публичный Метод

Gets the value of an attribute with the specified Name.
public this ( string name ) : string
name string The name of the attribute to retrieve.
Результат string