Struct svgdom::ParseOptions [] [src]

pub struct ParseOptions {
    pub parse_comments: bool,
    pub parse_declarations: bool,
    pub parse_unknown_elements: bool,
    pub parse_unknown_attributes: bool,
    pub parse_px_unit: bool,
    pub skip_unresolved_classes: bool,
    pub skip_invalid_attributes: bool,
    pub skip_invalid_css: bool,
    pub skip_paint_fallback: bool,
}

Options that defines SVG parsing.

Fields

Add comment nodes to the DOM during parsing.

Add declaration nodes to the DOM during parsing.

Add unknown elements to the DOM during parsing.

All elements which is not defined in ElementId are unknown.

Add unknown attributes to elements during parsing.

All attributes which is not defined in AttributeId are unknown.

px unit in the <length> type is rudimentary, since it's the same as none.

By default we parse it as is, but it can be disabled.

Skip unresolved references inside the class attribute.

It's enabled by default, but if you disable it - all unresolved classes will be kept in the class attribute.

Skip attributes with invalid values.

By default, attribute with an invalid value will lead to a parsing error. This flag allows converting this error into a warning.

Skip invalid/unsupported CSS.

By default, CSS with an invalid/unsupported value will lead to a parsing error. This flag allows converting this error into a warning.

Ignore fallback value in paint attributes.

If this option is enabled then the color part in attributes like this fill="url(#lg1) #fff" will be ignored.

Otherwise UnsupportedPaintFallback error will occur during parsing.

Trait Implementations

impl Default for ParseOptions
[src]

[src]

Returns the "default value" for a type. Read more