C# Класс SharpVectors.Dom.Svg.SvgDocument

The root object in the document object hierarchy of an Svg document.

When an 'svg' element is embedded inline as a component of a document from another namespace, such as when an 'svg' element is embedded inline within an XHTML document [XHTML], then an ISvgDocument object will not exist; instead, the root object in the document object hierarchy will be a Document object of a different type, such as an HTMLDocument object.

However, an ISvgDocument object will indeed exist when the root element of the XML document hierarchy is an 'svg' element, such as when viewing a stand-alone SVG file (i.e., a file with MIME type "image/svg+xml"). In this case, the ISvgDocument object will be the root object of the document object model hierarchy.

In the case where an SVG document is embedded by reference, such as when an XHTML document has an 'object' element whose href attribute references an SVG document (i.e., a document whose MIME type is "image/svg+xml" and whose root element is thus an 'svg' element), there will exist two distinct DOM hierarchies. The first DOM hierarchy will be for the referencing document (e.g., an XHTML document). The second DOM hierarchy will be for the referenced SVG document. In this second DOM hierarchy, the root object of the document object model hierarchy is an ISvgDocument object.

The ISvgDocument interface contains a similar list of attributes and methods to the HTMLDocument interface described in the Document Object Model (HTML) Level 1 chapter of the [DOM1] specification.

Наследование: SharpVectors.Dom.Css.CssXmlDocument, ISvgDocument
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
SvgNamespace string
XLinkNamespace string

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

Метод Описание
CreateElement ( string prefix, string localName, string ns ) : XmlElement
GetElementById ( string elementId ) : XmlElement
GetNodeByUri ( Uri absoluteUri ) : XmlNode
GetNodeByUri ( string absoluteUrl ) : XmlNode
Load ( Stream stream ) : void

Loads the XML document from the specified stream.

Load ( TextReader reader ) : void

Loads the XML document from the specified TextReader.

Load ( XmlReader reader ) : void

Loads the XML document from the specified XmlReader.

Load ( string url ) : void

Loads the XML document from the specified URL.

Load ( string url, Stream stream ) : void

Loads the XML document from the specified stream but with the specified base URL

Render ( ISvgRenderer renderer ) : void
ResolveUri ( string uri ) : Uri
SetTagNameNodeType ( string prefix, string localName, Type type ) : void
Supports ( string feature, string version ) : bool
SvgDocument ( SvgWindow window ) : System

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

Метод Описание
buildTypeDictionary ( ) : void

buildTypeDictionary

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

Метод Описание
LoadAndFire ( XmlReader reader ) : void

Loads the specified XML data and fires load events.

prepareXmlResolver ( XmlReader reader ) : void

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

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

public CreateElement ( string prefix, string localName, string ns ) : XmlElement
prefix string
localName string
ns string
Результат System.Xml.XmlElement

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

public GetElementById ( string elementId ) : XmlElement
elementId string
Результат System.Xml.XmlElement

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

public GetNodeByUri ( Uri absoluteUri ) : XmlNode
absoluteUri System.Uri
Результат System.Xml.XmlNode

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

public GetNodeByUri ( string absoluteUrl ) : XmlNode
absoluteUrl string
Результат System.Xml.XmlNode

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

Loads the XML document from the specified stream.
public Load ( Stream stream ) : void
stream Stream /// The stream containing the XML document to load. ///
Результат void

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

Loads the XML document from the specified TextReader.
public Load ( TextReader reader ) : void
reader System.IO.TextReader
Результат void

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

Loads the XML document from the specified XmlReader.
public Load ( XmlReader reader ) : void
reader XmlReader /// The XmlReader used to feed the XML /// data into the document. ///
Результат void

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

Loads the XML document from the specified URL.
public Load ( string url ) : void
url string /// URL for the file containing the XML document to load. ///
Результат void

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

Loads the XML document from the specified stream but with the specified base URL
public Load ( string url, Stream stream ) : void
url string /// Base URL for the stream from which the XML document is loaded. ///
stream Stream /// The stream containing the XML document to load. ///
Результат void

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

public Render ( ISvgRenderer renderer ) : void
renderer ISvgRenderer
Результат void

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

public ResolveUri ( string uri ) : Uri
uri string
Результат System.Uri

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

public SetTagNameNodeType ( string prefix, string localName, Type type ) : void
prefix string
localName string
type System.Type
Результат void

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

public Supports ( string feature, string version ) : bool
feature string
version string
Результат bool

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

public SvgDocument ( SvgWindow window ) : System
window SvgWindow
Результат System

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

buildTypeDictionary
protected buildTypeDictionary ( ) : void
Результат void

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

SvgNamespace публичное статическое свойство

public static string SvgNamespace
Результат string

XLinkNamespace публичное статическое свойство

public static string XLinkNamespace
Результат string