Skip to main content

DoxygenXmlParser class

The DoxygenXmlParser class is responsible for parsing Doxygen-generated XML files and constructing the internal data model.

Signature

export declare class DoxygenXmlParser

Remarks

This class initialises the XML parser with options that preserve the order and structure of the original XML content, ensuring accurate conversion for documentation purposes. It maintains a counter for the number of files parsed and stores the resulting data model.

Example

const parser = new DoxygenXmlParser({ options });
const dataModel = await parser.parse();

Constructors

Constructor

Modifiers

Description

(constructor)(options)

Constructs a new instance of the DoxygenXmlParser class.

Properties

Property

Modifiers

Type

Description

images

AbstractDocImageType[]

options

CliOptions

The global configuration options.

xmlParser

XMLParser

The XML parser instance configured for Doxygen XML.

Methods

Method

Modifiers

Description

getAttributeBooleanValue(element, name)

Retrieves the value of a named attribute as a boolean.

getAttributeNumberValue(element, name)

Retrieves the value of a named attribute as a number.

getAttributesNames(element)

Retrieves the names of all attributes present on the specified XML element.

getAttributeStringValue(element, name)

Retrieves the value of a named attribute as a string.

getInnerElementBoolean(element, name)

Retrieves the boolean value of a named child element.

getInnerElementNumber(element, name)

Retrieves the numeric value of a named child element.

getInnerElements(element, name)

Retrieves an array of named child elements from the given XML element.

getInnerElementText(element, name)

Retrieves the text content of a named child element.

getInnerText(element)

Retrieves the text content of the XML element.

hasAttribute(element, name)

Determines whether the specified attribute exists on the given XML element.

hasAttributes(element)

Determines whether the specified XML element has any attributes.

hasInnerElement(element, name)

Determines whether the specified inner element exists on the given XML element.

hasInnerText(element)

Determines whether the XML element contains a text node.

isInnerElementText(element, name)

Determines whether a named inner element contains text.