ReaderSvgGetElementSvgText Method |
Namespace: Ab2d
public string GetElementSvgText( string elementName, ReaderSvgNamedObjectsSourceType elementNameType = ReaderSvgNamedObjectsSourceType.Auto )
GetElementSvgText returns svg text of the element with with the specified elementName. If the element is not found, null is returned. The method can be called after the svg file has been read.
Elements in svg file can use different attributes or inner elements to define their names. Usually id attribute is used for that. But some files (for example files from Visio) define title element for naming. Files created in Inkscape also define inkscape:label attribute that can also be used for naming.
To specify which attribute or element to use for naming the elementNameType parameter is used. By default it is set to Auto. This means that the same naming specification used to read the current svg file is used - defined by the NamedObjectsSource property. Other values specify other way to get the name.