On Tue, 2019-02-19 at 17:26 +1100, David Bellot via gir-devel-list wrote:
Hi,
I'm looking for a complete description of the GIR xml format. The website is a bit outdated and misses a lot of documentation (or at least it's my impression).
Why do you need a description of the XML format? Typically, using the GIR utilities means you don’t need to know the XML format.
Parsing the XML seems to be the only way to generate good quality static definitions for a typesafe language eg Java, Kotlin, Typescript. For a start there are a few useful immediate children of the root node that you can't read with the typelib API (eg C headers, pkg-config package name). But most of all, GITypeInfo doesn't contain a type name (calling g_base_inf_get_name() on a GITypeInfo causes an abort!). So any function definitions in the target language would have argument and return types limited to primitive types, opaque pointers, generic GObjects and other generic boxed types.