C# Класс PurplePen.XmlInput

A class to help with XML input.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Reader System.Xml.XmlTextReader

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

Метод Описание
BadXml ( string message ) : void

Throw an exception indicating the file format was wrong.

CheckElement ( string elementName ) : void

Check that we're at the given element name.

Dispose ( ) : void

Finish the file and close it.

FindSubElement ( bool first ) : bool
GetAttributeBool ( string name ) : bool
GetAttributeBool ( string name, bool defValue ) : bool
GetAttributeColor ( string name, SpecialColor defValue ) : SpecialColor
GetAttributeFloat ( string name ) : float
GetAttributeFloat ( string name, float defValue ) : float
GetAttributeInt ( string name ) : int
GetAttributeInt ( string name, int defValue ) : int
GetAttributeString ( string name ) : string
GetAttributeString ( string name, string defValue ) : string
GetContentBase64 ( ) : MemoryStream
GetContentString ( ) : string
MoveToContent ( ) : void

Move to the next content node.

Read ( ) : bool

Read to next content node.

Skip ( ) : void

Skip children of the current node.

XmlInput ( TextReader reader, string filename ) : System

Create an XmlInput to read XML from a TextReader.

XmlInput ( string filename ) : System

Create an XmlInput to read XML from a particular file.

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

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

Throw an exception indicating the file format was wrong.
public BadXml ( string message ) : void
message string Message, with String.Format style fill-ins.
Результат void

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

Check that we're at the given element name.
public CheckElement ( string elementName ) : void
elementName string
Результат void

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

Finish the file and close it.
public Dispose ( ) : void
Результат void

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

public FindSubElement ( bool first ) : bool
first bool
Результат bool

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

public GetAttributeBool ( string name ) : bool
name string
Результат bool

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

public GetAttributeBool ( string name, bool defValue ) : bool
name string
defValue bool
Результат bool

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

public GetAttributeColor ( string name, SpecialColor defValue ) : SpecialColor
name string
defValue SpecialColor
Результат SpecialColor

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

public GetAttributeFloat ( string name ) : float
name string
Результат float

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

public GetAttributeFloat ( string name, float defValue ) : float
name string
defValue float
Результат float

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

public GetAttributeInt ( string name ) : int
name string
Результат int

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

public GetAttributeInt ( string name, int defValue ) : int
name string
defValue int
Результат int

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

public GetAttributeString ( string name ) : string
name string
Результат string

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

public GetAttributeString ( string name, string defValue ) : string
name string
defValue string
Результат string

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

public GetContentBase64 ( ) : MemoryStream
Результат System.IO.MemoryStream

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

public GetContentString ( ) : string
Результат string

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

Move to the next content node.
public MoveToContent ( ) : void
Результат void

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

Read to next content node.
public Read ( ) : bool
Результат bool

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

Skip children of the current node.
public Skip ( ) : void
Результат void

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

Create an XmlInput to read XML from a TextReader.
public XmlInput ( TextReader reader, string filename ) : System
reader TextReader
filename string
Результат System

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

Create an XmlInput to read XML from a particular file.
public XmlInput ( string filename ) : System
filename string
Результат System

Описание свойств

Reader публичное свойство

public XmlTextReader,System.Xml Reader
Результат System.Xml.XmlTextReader