Depends on what your use cases are like - if it is one form that you have control of then you can restrict the fields that you add to the form inline with what your servlet can handle.
If you want to abide by a consistent structure - look to the "bound" data section of the xml, you can create an xsd or xdp schema to formalise your document structure and "bind" your fields on the form to prevent any expected field layouts creeping in.
I wrote an example of this the other day for another issue using an XSD. XDP might be better for your use case however if you later want to output to a PDF.
Create a new form and set the form model to use the following xml schema:
I've rebuilt it in the way you suggested, working well and have an xml.
Is there a way to know what this xml will look like? The form that is being submitted is multi step with a couple of different end points before they finally fill in contact information and hit submit. The xml I'm looking has my input fields but also other things that seem fragile.
For example there is a random <panel14942793831871494279383292/>
In my doPost method, can I get a list of all potential valid fields to then check if they have values and pull them out to save in a DB?