Gusex.Types.XsdTypeMapper (gusex v1.3.0)

Copy Markdown View Source

Provides field type lookup using a compile-time generated cache.

This module scans all struct definitions at compile time and builds a static type mapping for fast runtime lookup.

Summary

Functions

Returns the size of the type cache (for debugging).

Returns the Elixir type for a given XML element name using defined type mapping.

Parses a field value according to its XSD-defined type.

Functions

cache_size()

Returns the size of the type cache (for debugging).

get_type(element_name)

@spec get_type(String.t()) :: :string | :integer | :date | :boolean | :unknown

Returns the Elixir type for a given XML element name using defined type mapping.

parse_field(element_name, value)

@spec parse_field(String.t(), String.t() | nil) :: any()

Parses a field value according to its XSD-defined type.