The first working ANSI SQL LCA (multi-leg) query prototype operates at a principled nonlinear hierarchical manner fully supporting the most complex LCA queries against relational and XML data with hierarchical accuracy. This ANSI SQL prototype transparently integrates native XML at a full nonlinear hierarchical level by utilizing the inherent hierarchical processing capability in an unmodified commercial ANSI SQL processor as its hierarchical processing engine. It is then shown how this hierarchical engine capability is seamlessly extended to support native XML input, through full nonlinear hierarchical processing, to the automatic generation of structured XML. This entire hierarchical process is driven by ANSI SQL-92 syntax and semantics. Advanced dynamic nonlinear hierarchical structuring joining and any-to-any structure transformation are also naturally supported in the prototype. Actual examples are used and shown.