C# Class 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.

Inheritance: SharpVectors.Dom.Css.CssXmlDocument, ISvgDocument
Afficher le fichier Open project: codebutler/savagesvg Class Usage Examples

Méthodes publiques

Свойство Type Description
SvgNamespace string
XLinkNamespace string

Méthodes publiques

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

Méthodes protégées

Méthode Description
buildTypeDictionary ( ) : void

buildTypeDictionary

Private Methods

Méthode Description
LoadAndFire ( XmlReader reader ) : void

Loads the specified XML data and fires load events.

prepareXmlResolver ( XmlReader reader ) : void

Method Details

CreateElement() public méthode

public CreateElement ( string prefix, string localName, string ns ) : XmlElement
prefix string
localName string
ns string
Résultat System.Xml.XmlElement

GetElementById() public méthode

public GetElementById ( string elementId ) : XmlElement
elementId string
Résultat System.Xml.XmlElement

GetNodeByUri() public méthode

public GetNodeByUri ( Uri absoluteUri ) : XmlNode
absoluteUri System.Uri
Résultat System.Xml.XmlNode

GetNodeByUri() public méthode

public GetNodeByUri ( string absoluteUrl ) : XmlNode
absoluteUrl string
Résultat System.Xml.XmlNode

Load() public méthode

Loads the XML document from the specified stream.
public Load ( Stream stream ) : void
stream Stream /// The stream containing the XML document to load. ///
Résultat void

Load() public méthode

Loads the XML document from the specified TextReader.
public Load ( TextReader reader ) : void
reader System.IO.TextReader
Résultat void

Load() public méthode

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

Load() public méthode

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

Load() public méthode

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

Render() public méthode

public Render ( ISvgRenderer renderer ) : void
renderer ISvgRenderer
Résultat void

ResolveUri() public méthode

public ResolveUri ( string uri ) : Uri
uri string
Résultat System.Uri

SetTagNameNodeType() public méthode

public SetTagNameNodeType ( string prefix, string localName, Type type ) : void
prefix string
localName string
type System.Type
Résultat void

Supports() public méthode

public Supports ( string feature, string version ) : bool
feature string
version string
Résultat bool

SvgDocument() public méthode

public SvgDocument ( SvgWindow window ) : System
window SvgWindow
Résultat System

buildTypeDictionary() protected méthode

buildTypeDictionary
protected buildTypeDictionary ( ) : void
Résultat void

Property Details

SvgNamespace public_oe static_oe property

public static string SvgNamespace
Résultat string

XLinkNamespace public_oe static_oe property

public static string XLinkNamespace
Résultat string