Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::svg::parser::SVGParser Class Reference

Parse an SVG XML document. More...

#include "donner/svg/parser/SVGParser.h"

Classes

struct  Options
 Options to modify the parsing behavior. More...

Static Public Member Functions

static ParseResult< SVGDocumentParseSVG (std::string_view source, ParseWarningSink &warningSink, Options options={}, SVGDocument::Settings settings={}) noexcept
 Parses an SVG XML document from a string (typically the contents of a .svg file).
static ParseResult< SVGDocumentParseXMLDocument (xml::XMLDocument &&xmlDocument, ParseWarningSink &warningSink, Options options={}, SVGDocument::Settings settings={}) noexcept
 Parses an SVG XML document from an XML document tree.

Detailed Description

Parse an SVG XML document.

Member Function Documentation

◆ ParseSVG()

ParseResult< SVGDocument > donner::svg::parser::SVGParser::ParseSVG ( std::string_view source,
ParseWarningSink & warningSink,
Options options = {},
SVGDocument::Settings settings = {} )
staticnoexcept

Parses an SVG XML document from a string (typically the contents of a .svg file).

The input buffer does not need to be null-terminated, but if there are embedded null characters parsing will stop.

Parameters
sourceInput buffer containing the SVG XML document. Will not be modified.
warningSinkSink to collect warnings encountered during parsing.
optionsOptions to modify the parsing behavior.
settingsDocument settings, including the resource loader and processing mode.
Returns
Parsed SVGDocument, or an error if a fatal error is encountered.

◆ ParseXMLDocument()

ParseResult< SVGDocument > donner::svg::parser::SVGParser::ParseXMLDocument ( xml::XMLDocument && xmlDocument,
ParseWarningSink & warningSink,
Options options = {},
SVGDocument::Settings settings = {} )
staticnoexcept

Parses an SVG XML document from an XML document tree.

Parameters
xmlDocumentXML document to parse.
warningSinkSink to collect warnings encountered during parsing.
optionsOptions to modify the parsing behavior.
settingsDocument settings, including the resource loader and processing mode.
Returns
Parsed SVGDocument, or an error if a fatal error is encountered.

The documentation for this class was generated from the following file: