The generated XMLBeans are used to produce the XML form of a query as emitted by the base ADQL parser. The whole XMLBeans framework is a powerful setup. There are factories to build every single part of a query. Each bean allows manipulaton of its lower level structures, and there is access to all of the schema data, which is useful for introspection. There is a low level cursor architecture with the ability to quickly examine (modify, copy, insert, delete) parts of a query, and many useful utility functions.
The cursor architecture is used in semantic checking within the ADQL base parser.
The beans are particularly useful in producing a fragment of a query. For example, the base parser
in fragment mode can process in isolation the following fragment of ADQL:
(a.frequency<=110 AND a.frequency>=100) OR (a.frequency<=220 AND a.frequency>=210)
and the fragment of XML produced can then be inserted into an existing query. This aspect is used extensively in the VODesktop's Query Builder.