|
1 | 1 | --- |
2 | 2 | title: SVGDocument Class |
3 | 3 | second_title: Aspose.HTML for .NET API Reference |
4 | | -description: Aspose.Html.Dom.Svg.SVGDocument class. An SVGDocument is the root of the SVG hierarchy and holds the entire content. Besides providing access to the hierarchy it also provides some convenience methods for accessing certain sets of information from the 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 SVGDocument 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 SVGDocument 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 filei.e. a file with MIME type image/svgxml. In this case the SVGDocument object will be the root object of the document object model hierarchy |
| 4 | +description: Aspose.Html.Dom.Svg.SVGDocument class. An SVGDocument is the root of the SVG hierarchy and holds the entire content. Besides providing access to the hierarchy it also provides some convenience methods for accessing certain sets of information from the document. In addition to loading standard .svg files both the constructors and the Navigate method can load gzip-compressed .svgz files. 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 SVGDocument 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 SVGDocument 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 filei.e. a file with MIME type image/svgxml. In this case the SVGDocument object will be the root object of the document object model hierarchy |
5 | 5 | type: docs |
6 | 6 | weight: 2180 |
7 | 7 | url: /net/aspose.html.dom.svg/svgdocument/ |
8 | 8 | --- |
9 | 9 | ## SVGDocument class |
10 | 10 |
|
11 | | -An `SVGDocument` is the root of the SVG hierarchy and holds the entire content. Besides providing access to the hierarchy, it also provides some convenience methods for accessing certain sets of information from the 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 SVGDocument 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 SVGDocument 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 SVGDocument object will be the root object of the document object model hierarchy. |
| 11 | +An `SVGDocument` is the root of the SVG hierarchy and holds the entire content. Besides providing access to the hierarchy, it also provides some convenience methods for accessing certain sets of information from the document. In addition to loading standard .svg files, both the constructors and the [`Navigate`](../../aspose.html.dom/document/navigate/) method can load gzip-compressed .svgz files. 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 SVGDocument 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 SVGDocument 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 SVGDocument object will be the root object of the document object model hierarchy. |
12 | 12 |
|
13 | 13 | ```csharp |
14 | 14 | public class SVGDocument : Document, IDocumentCSS |
@@ -155,14 +155,17 @@ public class SVGDocument : Document, IDocumentCSS |
155 | 155 | | override [RenderTo](../../aspose.html.dom.svg/svgdocument/renderto/)(*[IDevice](../../aspose.html.rendering/idevice/)*) | This method is used to print the contents of the current document to the specified device. | |
156 | 156 | | [ReplaceChild](../../aspose.html.dom/node/replacechild/)(*[Node](../../aspose.html.dom/node/), [Node](../../aspose.html.dom/node/)*) | Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. If newChild is a DocumentFragment object, oldChild is replaced by all of the DocumentFragment children, which are inserted in the same order. If the newChild is already in the tree, it is first removed. | |
157 | 157 | | [Save](../../aspose.html.dom.svg/svgdocument/save/#save)(*[ResourceHandler](../../aspose.html.saving.resourcehandlers/resourcehandler/)*) | Saves the document content and resources using the [`ResourceHandler`](../../aspose.html.saving.resourcehandlers/resourcehandler/). | |
158 | | -| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_6)(*string*) | Saves the document to local file specified by `path`. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + "_files". | |
159 | | -| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_3)(*[Url](../../aspose.html/url/)*) | Saves the document to local file specified by `url`. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + "_files". | |
| 158 | +| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_8)(*string*) | Saves the document to local file specified by `path`. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + "_files". If the specified `url` ends with ".svgz", the document will be saved as a compressed SVGZ file. | |
| 159 | +| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_4)(*[Url](../../aspose.html/url/)*) | Saves the document to local file specified by `url`. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + "_files". If the specified `url` ends with ".svgz", the document will be saved as a compressed SVGZ file. | |
160 | 160 | | [Save](../../aspose.html.dom.svg/svgdocument/save/#save_1)(*[ResourceHandler](../../aspose.html.saving.resourcehandlers/resourcehandler/), [SVGSaveFormat](../../aspose.html.dom.svg.saving/svgsaveformat/)*) | Saves the document content and resources using the [`ResourceHandler`](../../aspose.html.saving.resourcehandlers/resourcehandler/). | |
161 | 161 | | [Save](../../aspose.html.dom.svg/svgdocument/save/#save_2)(*[ResourceHandler](../../aspose.html.saving.resourcehandlers/resourcehandler/), [SVGSaveOptions](../../aspose.html.dom.svg.saving/svgsaveoptions/)*) | Saves the document content and resources using the [`ResourceHandler`](../../aspose.html.saving.resourcehandlers/resourcehandler/). | |
162 | | -| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_7)(*string, [SVGSaveFormat](../../aspose.html.dom.svg.saving/svgsaveformat/)*) | Saves the document to local file specified by `path`. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + "_files". | |
163 | | -| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_8)(*string, [SVGSaveOptions](../../aspose.html.dom.svg.saving/svgsaveoptions/)*) | Saves the document to local file specified by `path`. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + "_files". | |
164 | | -| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_4)(*[Url](../../aspose.html/url/), [SVGSaveFormat](../../aspose.html.dom.svg.saving/svgsaveformat/)*) | Saves the document to local file specified by `url`. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + "_files". | |
165 | | -| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_5)(*[Url](../../aspose.html/url/), [SVGSaveOptions](../../aspose.html.dom.svg.saving/svgsaveoptions/)*) | Saves the document to local file specified by `url`. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + "_files". | |
| 162 | +| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_3)(*[ResourceHandler](../../aspose.html.saving.resourcehandlers/resourcehandler/), [SVGZSaveOptions](../../aspose.html.dom.svg.saving/svgzsaveoptions/)*) | Saves the document content and associated resources using the specified [`ResourceHandler`](../../aspose.html.saving.resourcehandlers/resourcehandler/). | |
| 163 | +| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_9)(*string, [SVGSaveFormat](../../aspose.html.dom.svg.saving/svgsaveformat/)*) | Saves the document to local file specified by `path`. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + "_files". | |
| 164 | +| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_10)(*string, [SVGSaveOptions](../../aspose.html.dom.svg.saving/svgsaveoptions/)*) | Saves the document as an `.svg` file to the local path specified by *path*. Any external resources are written to a sibling folder named `{output_file_name}_files`. | |
| 165 | +| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_11)(*string, [SVGZSaveOptions](../../aspose.html.dom.svg.saving/svgzsaveoptions/)*) | Saves the document as a compressed `.svgz` file to the local path specified by *path*. Any external resources are written to a sibling folder named `{output_file_name}_files`. | |
| 166 | +| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_5)(*[Url](../../aspose.html/url/), [SVGSaveFormat](../../aspose.html.dom.svg.saving/svgsaveformat/)*) | Saves the document to local file specified by `url`. All resources used in this document will be saved in to adjacent folder, whose name will be constructed as: output_file_name + "_files". | |
| 167 | +| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_6)(*[Url](../../aspose.html/url/), [SVGSaveOptions](../../aspose.html.dom.svg.saving/svgsaveoptions/)*) | Saves the document as an `.svg` file to *url*. All external resources are placed in a sibling folder named `{output_file_name}_files`. | |
| 168 | +| [Save](../../aspose.html.dom.svg/svgdocument/save/#save_7)(*[Url](../../aspose.html/url/), [SVGZSaveOptions](../../aspose.html.dom.svg.saving/svgzsaveoptions/)*) | Saves the document as a compressed `.svgz` file to *url*. All external resources are placed in a sibling folder named `{output_file_name}_files`. | |
166 | 169 | | override [ToString](../../aspose.html.dom/node/tostring/)() | Returns a String that represents this instance. | |
167 | 170 | | [Write](../../aspose.html.dom/document/write/)(*params string[]*) | Write a string of text to a document stream opened by open(). Note that the function will produce a document which is not necessarily driven by a DTD and therefore might be produce an invalid result in the context of the document. | |
168 | 171 | | [WriteLn](../../aspose.html.dom/document/writeln/)(*params string[]*) | Write a string of text followed by a newline character to a document stream opened by open(). Note that the function will produce a document which is not necessarily driven by a DTD and therefore might be produce an invalid result in the context of the document | |
|
0 commit comments