Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::svg::parser::XMLParser Class Reference

Parse an SVG XML document. More...

#include "donner/svg/xml/XMLParser.h"

Classes

struct  InputBuffer
 Convert a string into a mutable vector<char> that is suitable for use with Donner's XMLParser. More...
 
struct  Options
 Options to modify the parsing behavior. More...
 

Static Public Member Functions

static ParseResult< SVGDocumentParseSVG (InputBuffer &source, std::vector< ParseError > *outWarnings=nullptr, Options options={}, std::unique_ptr< ResourceLoaderInterface > resourceLoader=nullptr) noexcept
 Parses an SVG XML document (typically the contents of a .svg file).
 

Detailed Description

Parse an SVG XML document.

Member Function Documentation

◆ ParseSVG()

ParseResult< SVGDocument > donner::svg::parser::XMLParser::ParseSVG ( InputBuffer & source,
std::vector< ParseError > * outWarnings = nullptr,
XMLParser::Options options = {},
std::unique_ptr< ResourceLoaderInterface > resourceLoader = nullptr )
staticnoexcept

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

To reduce copying, the input buffer is modified to produce substrings, so it must be mutable and end with a '\0'.

Parameters
sourceMutable input data buffer.
[out]outWarningsIf non-null, append warnings encountered to this vector.
optionsOptions to modify the parsing behavior.
resourceLoaderResource loader to use for loading external resources.
Returns
Parsed SVGDocument, or an error if a fatal error is encountered.
Examples
svg_tree_interaction.cc.

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