UiXmlParser

Parses the .ui XML authoring format into a UiDocument. Reports the source location of the first structural error via UiParseException.

Fields

Namespace (string) = "https://turian.mass4.org/ui": The default XML namespace for the UI vocabulary.

Public Methods

Parse

public static UiDocument Parse(string xml, string? sourcePath = null)

Parses xml into a document.

Parameters:

  • xml (string): The .ui document text.
  • sourcePath (string?): Optional path recorded on the document for diagnostics. (Default: null)

Returns: UiDocument

ParseFragment

public static UiElement ParseFragment(string xml)

Parses a single element fragment (one XML element, with its own namespace declaration) — used to expand a <Template> after $param substitution.

Parameters:

  • xml (string): One well-formed XML element.

Returns: UiElement