For Caramelised Onions: Heat a large non stick frying pan over medium heat.
Halve the onions from root to tip. Place cut side down and very finely slice from the shortest end. (to create half moon shapes).
Heat olive oil in pan on medium heat and cook off the onions, stirring until starting to brown and caramelise, approx. 10minutes.
Add the vinegar and brown sugar and stir until the sugar has dissolved and the mixture is bubbling. Reduce heat to medium low.
Cook stiring occasionally until all liquid has evaporated and absorbed, approx. 30minutes.
Allow to cool.
For Pastry: Combine flour, Xanthan Gum and butter in a food processor and whiz until fine breadcrumbs.
Add Egg and Vinegar and pulse until just combined.
Add the water/milk and pulse until barely incorporated.
Tip out and bring together to form a ball. Wrap in plastic and allow to rest in the fridge for 1 hour.
Oven preheated to 190c.
Roll out the pastry between 2 sheets of silicone paper until the correct size for the tart tin.
Place in tart shell and press into the corners. Line with silicone paper and place baking beads or dried beans to cover (this is to stop it puffing up)
Bake for 10-15 minutes until just cooked and pulling away from the sides of tin.
For Filling: Preheat oven to 180C
Combine Eggs and cream and the leaves of 3 sprigs of thyme and whisk to combine. Season with salt and pepper. (I use a pirex jug for this it’s easier to pour the egg mix out later on)
Place the tart tin on a flat tray (incase of leakage)
Put a thin layer of the onions in the base of the pastry shell.
Pile the remaining ingredients into the tart tin. (I like to pile it beyond the rim and have a mix of the ingredients showing)
Pour the egg mix in slowly. To help the egg mix settle gently shake the tin. Also pouring a few different positions also helps with coverage.
When filled place the tart into the preheated oven for 30-40minutes or until the egg mix has just set in the middle.
Garnish with fresh thyme sprigs and some more goats cheese.
Serve hot or cold.