C# Class Sgml.SgmlReader

SgmlReader is an XmlReader API over any SGML document (including built in support for HTML).
Inheritance: XmlReader
Afficher le fichier Open project: Synergex/Baconography Class Usage Examples

Private Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Changes the ReadState to Closed.

Private Methods

Méthode Description
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

Method Details

Dispose() protected méthode

Changes the ReadState to Closed.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GetAttribute() public méthode

Gets the value of the attribute with the specified index.
public GetAttribute ( int i ) : string
i int The index of the attribute.
Résultat string

GetAttribute() public méthode

Gets the value of an attribute with the specified Name.
public GetAttribute ( string name ) : string
name string The name of the attribute to retrieve.
Résultat string

GetAttribute() public méthode

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.
Résultat string

LookupNamespace() public méthode

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.
Résultat string

MoveToAttribute() public méthode

Moves to the atttribute with the specified Name.
public MoveToAttribute ( string name ) : bool
name string The qualified name of the attribute.
Résultat bool

MoveToAttribute() public méthode

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.
Résultat bool

MoveToAttribute() public méthode

Moves to the attribute with the specified index.
public MoveToAttribute ( int i ) : void
i int The index of the attribute to move to.
Résultat void

MoveToElement() public méthode

Moves to the element that contains the current attribute node.
public MoveToElement ( ) : bool
Résultat bool

MoveToFirstAttribute() public méthode

Moves to the first attribute.
public MoveToFirstAttribute ( ) : bool
Résultat bool

MoveToNextAttribute() public méthode

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
Résultat bool

Read() public méthode

Reads the next node from the stream.
public Read ( ) : bool
Résultat bool

ReadAttributeValue() public méthode

Parses the attribute value into one or more Text, EntityReference, or EndEntity nodes.
public ReadAttributeValue ( ) : bool
Résultat bool

ReadInnerXml() public méthode

Reads all the content, including markup, as a string.
public ReadInnerXml ( ) : string
Résultat string

ReadOuterXml() public méthode

Reads the content, including markup, representing this node and all its children.
public ReadOuterXml ( ) : string
Résultat string

ReadString() public méthode

Reads the contents of an element or text node as a string.
public ReadString ( ) : string
Résultat string

ResolveEntity() public méthode

Resolves the entity reference for EntityReference nodes.
SgmlReader does not resolve or return entities.
public ResolveEntity ( ) : void
Résultat void

SetBaseUri() public méthode

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
Résultat void

SgmlReader() public méthode

Initialises a new instance of the SgmlReader class.
public SgmlReader ( ) : System
Résultat System

SgmlReader() public méthode

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.
Résultat System

this() public méthode

Gets the value of the attribute with the specified index.
public this ( int i ) : string
i int The index of the attribute.
Résultat string

this() public méthode

Gets the value of an attribute with the specified Name.
public this ( string name ) : string
name string The name of the attribute to retrieve.
Résultat string