C# Class Sage.ResourceManagement.CacheableXmlDocument

Extends the XmlDocument with an advanced loading facilities and additional properties that provide the last modification date and a list of files that the document depends on.
Inheritance: System.Xml.XmlDocument
Mostra file Open project: igorfrance/sage Class Usage Examples

Public Methods

Method Description
AddDependencies ( ) : void

Adds the specified dependencies.

AddDependencies ( IEnumerable dependencies ) : void

Adds the specified dependencies.

CacheableXmlDocument ( ) : System

Initializes a new instance of the CacheableXmlDocument class.

CreateReaderSettings ( XmlUrlResolver resolver ) : XmlReaderSettings

Creates XmlReaderSettings and assigns it the specified resolver.

Load ( string filename, SageContext context ) : void

Loads the XML document from the specified URL, with support for sage:include elements.

Private Methods

Method Description
CreateErrorElement ( string errorText ) : XmlElement
GetIncludeId ( XmlElement includingElement ) : string
LoadInternal ( string filename, SageContext context, bool processIncludes = true ) : void
ProcessInclude ( XmlNamespaceManager nm, XmlElement element, IncludeProcessingState state ) : XmlNode
ProcessIncludes ( XmlNode contentElement, IncludeProcessingState state ) : void
ProcessIncludes ( XmlNode contextElement, SageContext context ) : void
ResolveExtraDocumentInclude ( XmlNamespaceManager nm, string parse, string includePath, string xpath, string encoding, SageContext context ) : XmlNode
ResolveIntraDocumentInclude ( XmlNamespaceManager nm, string parse, XmlElement element, string xpath ) : XmlNode

Method Details

AddDependencies() public method

Adds the specified dependencies.
public AddDependencies ( ) : void
return void

AddDependencies() public method

Adds the specified dependencies.
public AddDependencies ( IEnumerable dependencies ) : void
dependencies IEnumerable The dependencies to add.
return void

CacheableXmlDocument() public method

Initializes a new instance of the CacheableXmlDocument class.
public CacheableXmlDocument ( ) : System
return System

CreateReaderSettings() public static method

Creates XmlReaderSettings and assigns it the specified resolver.
public static CreateReaderSettings ( XmlUrlResolver resolver ) : XmlReaderSettings
resolver System.Xml.XmlUrlResolver The resolver to use with this settings..
return System.Xml.XmlReaderSettings

Load() public method

Loads the XML document from the specified URL, with support for sage:include elements.
public Load ( string filename, SageContext context ) : void
filename string URL for the file containing the XML document to load. The URL can be either a local /// file or an HTTP URL (a Web address).
context SageContext The context under which the code is being invoked.
return void