C# Class Mvp.Xml.XInclude.XIncludingReader

XIncludingReader class implements streamable subset of the XInclude 1.0 in a fast, non-caching, forward-only fashion. To put it another way XIncludingReader is XML Base and XInclude 1.0 aware XmlReader.

See XInclude.NET homepage for more info.

Author: Oleg Tkachenko, http://www.xmllab.net.

Inheritance: XmlReader, IXmlLineInfo
Exibir arquivo Open project: Monobjc/monobjc-tools Class Usage Examples

Public Methods

Method Description
Close ( ) : void

See XmlReader.Close

GetAttribute ( int i ) : string

See XmlReader.GetAttribute(int)

GetAttribute ( string name ) : string

See XmlReader.GetAttribute(string)

GetAttribute ( string name, string namespaceURI ) : string

See XmlReader.GetAttribute(string, string)

HasLineInfo ( ) : bool

Gets a value indicating whether the class can return line information. See IXmlLineInfo.HasLineInfo.

LookupNamespace ( String prefix ) : String

See XmlReader.LookupNamespace

MoveToAttribute ( string name ) : bool

See XmlReader.MoveToAttribute(string)

MoveToAttribute ( string name, string ns ) : bool

See XmlReader.MoveToAttribute(string, string)

MoveToAttribute ( int i ) : void

See XmlReader.MoveToAttribute(int)

MoveToElement ( ) : bool

See XmlReader.MoveToElement

MoveToFirstAttribute ( ) : bool

See XmlReader.MoveToFirstAttribute

MoveToNextAttribute ( ) : bool

See XmlReader.MoveToNextAttribute

Read ( ) : bool

See XmlReader.Read

ReadAttributeValue ( ) : bool

See XmlReader.ReadAttributeValue

ReadInnerXml ( ) : string

See XmlReader.ReadInnerXml

ReadOuterXml ( ) : string

See XmlReader.ReadOuterXml

ReadString ( ) : string

See XmlReader.ReadString

ResolveEntity ( ) : void

See XmlReader.ResolveEntity

XIncludingReader ( Stream input ) : System

Creates new instance of XIncludingReader class with specified Stream.

XIncludingReader ( Stream input, XmlNameTable nt ) : System

Creates new instance of XIncludingReader class with specified Stream and nametable.

XIncludingReader ( TextReader reader ) : System

Creates new instance of XIncludingReader class with specified TextReader reader.

XIncludingReader ( TextReader reader, XmlNameTable nt ) : System

Creates new instance of XIncludingReader class with specified TextReader reader and nametable.

XIncludingReader ( XmlReader reader ) : System

Creates new instance of XIncludingReader class with specified underlying XmlReader reader.

XIncludingReader ( string url ) : System

Creates new instance of XIncludingReader class with specified URL.

XIncludingReader ( string url, Stream input ) : System

Creates new instance of XIncludingReader class with specified URL and Stream.

XIncludingReader ( string url, Stream input, XmlNameTable nt ) : System

Creates new instance of XIncludingReader class with specified URL, Stream and nametable.

XIncludingReader ( string url, Stream input, XmlResolver resolver ) : System

Creates new instance of XIncludingReader class with specified URL, Stream and resolver.

XIncludingReader ( string url, TextReader reader ) : System

Creates new instance of XIncludingReader class with specified URL and TextReader reader.

XIncludingReader ( string url, TextReader reader, XmlNameTable nt ) : System

Creates new instance of XIncludingReader class with specified URL, TextReader reader and nametable.

XIncludingReader ( string url, XmlNameTable nt ) : System

Creates new instance of XIncludingReader class with specified URL and nametable.

XIncludingReader ( string url, XmlResolver resolver ) : System

Creates new instance of XIncludingReader class with specified URL and resolver.

this ( int i ) : String

See XmlReader.this[int]

this ( string name ) : string

See XmlReader.this[string]

this ( string name, string namespaceURI ) : string

See XmlReader.this[string, string]

Private Methods

Method Description
AreDifferentLangs ( string lang1, string lang2 ) : bool

Compares two languages as per IETF RFC 3066.

CheckAndSkipContent ( ) : void

Skips xi:include element's content, while checking XInclude syntax (no xi:include, no more than one xi:fallback).

CheckLoops ( Uri url, string xpointer ) : void

Checks for inclusion loops.

CreateAcquiredInfoset ( Uri includeLocation ) : string

Creates acquired infoset.

CreateAcquiredInfoset ( Uri includeLocation, TextReader reader ) : string

Creates acquired infoset.

CreateAcquiredInfoset ( XmlReader reader ) : string

Creates acquired infoset.

GetBaseUri ( ) : string
GetResource ( string includeLocation, string accept, string acceptLanguage, WebResponse &response ) : Stream

Fetches resource by URI.

IsFallbackElement ( XmlReader r ) : bool

/// Checks if given reader is positioned on a xi:fallback element.

IsIncludeElement ( XmlReader r ) : bool

Checks if given reader is positioned on a xi:include element.

ProcessFallback ( int depth, Exception e ) : bool

Fallback processing.

When inluding fails due to any resource error, xi:inlcude element content is processed as follows: each child xi:include - fatal error, more than one child xi:fallback - fatal error. No xi:fallback - the resource error results in a fatal error. Content of first xi:fallback element is included in a usual way.

ProcessIncludeElement ( ) : bool

Processes xi:include element.

ProcessInterDocTextInclusion ( string href ) : bool

Process inter-document inclusion as text.

ProcessInterDocXMLInclusion ( string href, string xpointer ) : bool

Processes inter-document inclusion (xml mode).

ResolveHref ( string href ) : Uri

Resolves include location.

SkipContent ( ) : void

Skips content of an element using directly current reader's methods.

ThrowCircularInclusionError ( XmlReader reader, Uri url ) : void

Throws CircularInclusionException.

ValidationCallback ( object sender, ValidationEventArgs args ) : void

Method Details

Close() public method

See XmlReader.Close
public Close ( ) : void
return void

GetAttribute() public method

See XmlReader.GetAttribute(int)
public GetAttribute ( int i ) : string
i int
return string

GetAttribute() public method

See XmlReader.GetAttribute(string)
public GetAttribute ( string name ) : string
name string
return string

GetAttribute() public method

See XmlReader.GetAttribute(string, string)
public GetAttribute ( string name, string namespaceURI ) : string
name string
namespaceURI string
return string

HasLineInfo() public method

Gets a value indicating whether the class can return line information. See IXmlLineInfo.HasLineInfo.
public HasLineInfo ( ) : bool
return bool

LookupNamespace() public method

See XmlReader.LookupNamespace
public LookupNamespace ( String prefix ) : String
prefix String
return String

MoveToAttribute() public method

See XmlReader.MoveToAttribute(string)
public MoveToAttribute ( string name ) : bool
name string
return bool

MoveToAttribute() public method

See XmlReader.MoveToAttribute(string, string)
public MoveToAttribute ( string name, string ns ) : bool
name string
ns string
return bool

MoveToAttribute() public method

See XmlReader.MoveToAttribute(int)
public MoveToAttribute ( int i ) : void
i int
return void

MoveToElement() public method

See XmlReader.MoveToElement
public MoveToElement ( ) : bool
return bool

MoveToFirstAttribute() public method

See XmlReader.MoveToFirstAttribute
public MoveToFirstAttribute ( ) : bool
return bool

MoveToNextAttribute() public method

See XmlReader.MoveToNextAttribute
public MoveToNextAttribute ( ) : bool
return bool

Read() public method

See XmlReader.Read
public Read ( ) : bool
return bool

ReadAttributeValue() public method

See XmlReader.ReadAttributeValue
public ReadAttributeValue ( ) : bool
return bool

ReadInnerXml() public method

See XmlReader.ReadInnerXml
public ReadInnerXml ( ) : string
return string

ReadOuterXml() public method

See XmlReader.ReadOuterXml
public ReadOuterXml ( ) : string
return string

ReadString() public method

See XmlReader.ReadString
public ReadString ( ) : string
return string

ResolveEntity() public method

See XmlReader.ResolveEntity
public ResolveEntity ( ) : void
return void

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified Stream.
public XIncludingReader ( Stream input ) : System
input Stream Stream.
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified Stream and nametable.
public XIncludingReader ( Stream input, XmlNameTable nt ) : System
input Stream Stream.
nt System.Xml.XmlNameTable Nametable
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified TextReader reader.
public XIncludingReader ( TextReader reader ) : System
reader TextReader TextReader.
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified TextReader reader and nametable.
public XIncludingReader ( TextReader reader, XmlNameTable nt ) : System
reader TextReader TextReader.
nt System.Xml.XmlNameTable Nametable.
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified underlying XmlReader reader.
public XIncludingReader ( XmlReader reader ) : System
reader XmlReader Underlying reader to read from
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified URL.
public XIncludingReader ( string url ) : System
url string Document location.
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified URL and Stream.
public XIncludingReader ( string url, Stream input ) : System
url string Source document's URL
input Stream Stream.
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified URL, Stream and nametable.
public XIncludingReader ( string url, Stream input, XmlNameTable nt ) : System
url string Source document's URL
input Stream Stream.
nt System.Xml.XmlNameTable Nametable
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified URL, Stream and resolver.
public XIncludingReader ( string url, Stream input, XmlResolver resolver ) : System
url string Source document's URL
input Stream Stream.
resolver System.Xml.XmlResolver Resolver to acquire external resources.
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified URL and TextReader reader.
public XIncludingReader ( string url, TextReader reader ) : System
url string Source document's URL
reader TextReader TextReader.
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified URL, TextReader reader and nametable.
public XIncludingReader ( string url, TextReader reader, XmlNameTable nt ) : System
url string Source document's URI
reader TextReader TextReader.
nt System.Xml.XmlNameTable Nametable.
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified URL and nametable.
public XIncludingReader ( string url, XmlNameTable nt ) : System
url string Document location.
nt System.Xml.XmlNameTable Name table.
return System

XIncludingReader() public method

Creates new instance of XIncludingReader class with specified URL and resolver.
public XIncludingReader ( string url, XmlResolver resolver ) : System
url string Document location.
resolver System.Xml.XmlResolver Resolver to acquire external resources.
return System

this() public method

See XmlReader.this[int]
public this ( int i ) : String
i int
return String

this() public method

See XmlReader.this[string]
public this ( string name ) : string
name string
return string

this() public method

See XmlReader.this[string, string]
public this ( string name, string namespaceURI ) : string
name string
namespaceURI string
return string