XmlDocumentationElement

Represents a base XML documentation element with common properties.

Syntax

public abstract class XmlDocumentationElement

Inheritance

Constructors

XmlDocumentationElement

protected XmlDocumentationElement()
Initializes a new instance of the XmlDocumentationElement class.

XmlDocumentationElement

protected XmlDocumentationElement(XElement element)
Initializes a new instance of the XmlDocumentationElement class with XML content.

Parameters

  • element XElement: The XML element to parse.

Properties

InnerElements

public List<XmlDocumentationElement> InnerElements { get; set; }
Gets or sets the inner XML elements for nested content.

Returns

List<XmlDocumentationElement>

RawXml

public string RawXml { get; set; }
Gets or sets the raw XML content of the element.

Returns

string

Text

public string Text { get; set; }
Gets or sets the parsed text content of the element.

Returns

string

Methods

CreateDocumentationElement

protected virtual XmlDocumentationElement CreateDocumentationElement(XElement element)
Creates the appropriate documentation element based on the XML element name.

Parameters

  • element XElement: The XML element to convert.

Returns

XmlDocumentationElement The appropriate documentation element, or null if not supported.

ParseInnerElements

protected virtual void ParseInnerElements(XElement element)
Parses inner XML elements recursively.

Parameters

  • element XElement: The parent XML element to parse.

ToMdx

public abstract string ToMdx()
Converts this element to MDX format.

Returns

string The MDX representation of this element.

Remarks

This abstract class provides the foundation for all XML documentation elements, including summary, remarks, parameters, returns, and other documentation tags. It handles parsing of XML content and preserves the original structure for conversion to MDX format.