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

Options to modify the parsing behavior. More...

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

Public Member Functions

constexpr Options ()
 Default options.

Static Public Member Functions

static Options ParseAll ()
 Parse all nodes in the XML document, including comments, the doctype node, and processing instructions.

Public Attributes

bool parseComments = false
 Parse comments in the XML document, e.g.
bool parseDoctype = true
 Parse the doctype node in the XML document, e.g.
bool parseCustomEntities = false
 Parse custom entities in the XML document, e.g.
bool parseProcessingInstructions = false
 Parse processing instructions in the XML document, e.g.
bool disableEntityTranslation = false
 Disable entity translation during parsing.
int maxEntityDepth = 64
 Maximum nesting depth allowed while expanding entities.
uint64_t maxEntitySubstitutions = 1'000
 Maximum total entity substitutions allowed for a single document parse.

Detailed Description

Options to modify the parsing behavior.

Member Data Documentation

◆ disableEntityTranslation

Disable entity translation during parsing.

If this flag is set to true, built-in entities such as & and < will not be translated to their respective characters.

◆ maxEntityDepth

Maximum nesting depth allowed while expanding entities.

Defaults to 64. Failing to stay under this limit will cause parsing to fail with a resource exhaustion error.

◆ maxEntitySubstitutions

Maximum total entity substitutions allowed for a single document parse.

Defaults to 1'000. Failing to stay under this limit will cause parsing to fail with a resource exhaustion error.

◆ parseComments

Parse comments in the XML document, e.g.

<!-- ... -->. If this flag is set to true, comments will be parsed as XMLNode::Type::Comment nodes added to the document tree.

◆ parseCustomEntities

Parse custom entities in the XML document, e.g.

<!ENTITY ...>. If this flag is set to true, custom entities will be parsed and and translated in the document tree.

◆ parseDoctype

Parse the doctype node in the XML document, e.g.

<!DOCTYPE ...>. If this flag is set to true, the doctype node will be parsed as a XMLNode::Type::Doctype node added to the document tree.

◆ parseProcessingInstructions

Parse processing instructions in the XML document, e.g.

<?php ...>. If this flag is set to true, processing instructions will be parsed as XMLNode::Type::ProcessingInstruction nodes added to the document tree.


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