diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml
index 7ab583d9683..0651caa88b6 100644
--- a/.github/workflows/ci_tests.yml
+++ b/.github/workflows/ci_tests.yml
@@ -97,7 +97,7 @@ jobs:
fail-fast : false
matrix:
include:
- # Validates the code-style using uncrustify
+ # Validates C++ style (uncrustify) and XML formatting (format_xml)
- name: Check code style
BUILD_AND_TEST_ARGS: --test-code-style
# Validates that the documentation generated using doxygen has no hole.
diff --git a/examples/GPU/beamBending.xml b/examples/GPU/beamBending.xml
index 2d5c3852bed..fa00000d237 100644
--- a/examples/GPU/beamBending.xml
+++ b/examples/GPU/beamBending.xml
@@ -12,9 +12,7 @@
discretization="FE1"
targetRegions="{ Region2 }">
-
+
-
+
-
+
-
+
@@ -145,12 +135,8 @@
-
+
-
+
diff --git a/examples/advanced_xml_features/included/included_a.xml b/examples/advanced_xml_features/included/included_a.xml
index 66f4abed35e..11fb9aa0960 100644
--- a/examples/advanced_xml_features/included/included_a.xml
+++ b/examples/advanced_xml_features/included/included_a.xml
@@ -7,9 +7,7 @@
name="SinglePhaseFlow"
discretization="singlePhaseTPFA"
targetRegions="{ Region1 }">
-
+
@@ -27,14 +25,8 @@
-
+
-
+
diff --git a/examples/advanced_xml_features/included/included_b.xml b/examples/advanced_xml_features/included/included_b.xml
index ba2aa87baed..b0bd9da3a2c 100644
--- a/examples/advanced_xml_features/included/included_b.xml
+++ b/examples/advanced_xml_features/included/included_b.xml
@@ -3,15 +3,9 @@
-
+
-
+
-
+
-
+
@@ -49,8 +39,7 @@
porosityModelName="rockPorosity"
permeabilityModelName="rockPerm"/>
-
+
-
+
-
+
-
+
diff --git a/examples/advanced_xml_features/included_files_example.xml b/examples/advanced_xml_features/included_files_example.xml
index 1e36184f8ff..191249136f3 100644
--- a/examples/advanced_xml_features/included_files_example.xml
+++ b/examples/advanced_xml_features/included_files_example.xml
@@ -17,13 +17,10 @@ using the following rules:
Otherwise insert the target into the xml structure as-is
-->
-
+
-
+
-
+
diff --git a/examples/advanced_xml_features/parameters_example.xml b/examples/advanced_xml_features/parameters_example.xml
index fa31e5d4bd3..a8b92c7a1ad 100644
--- a/examples/advanced_xml_features/parameters_example.xml
+++ b/examples/advanced_xml_features/parameters_example.xml
@@ -17,17 +17,11 @@ XML Units:
- These use a python-style format e.g. (0.1 [m/s**2])
-->
-
+
-
+
-
+
-
+
@@ -56,28 +48,16 @@ XML Units:
-
-
-
+
+
+
-
+
-
+
-
+
-
+
@@ -115,8 +91,7 @@ XML Units:
porosityModelName="rockPorosity"
permeabilityModelName="rockPerm"/>
-
+
-
+
-
+
diff --git a/examples/advanced_xml_features/symbolic_math_example.xml b/examples/advanced_xml_features/symbolic_math_example.xml
index e4d3f4942dd..573c801f714 100644
--- a/examples/advanced_xml_features/symbolic_math_example.xml
+++ b/examples/advanced_xml_features/symbolic_math_example.xml
@@ -27,17 +27,11 @@ XML Symbolic Math:
- This constraint can be relaxed to allow more complicated functions (sin, cos, etc.)
-->
-
+
-
+
-
+
-
+
@@ -66,28 +58,16 @@ XML Symbolic Math:
-
-
-
+
+
+
-
+
-
+
-
+
-
+
@@ -125,8 +101,7 @@ XML Symbolic Math:
porosityModelName="rockPorosity"
permeabilityModelName="rockPerm"/>
-
+
-
+
-
+
diff --git a/examples/event_examples.xml b/examples/event_examples.xml
index 582343b5875..0059c9f4ae8 100644
--- a/examples/event_examples.xml
+++ b/examples/event_examples.xml
@@ -5,40 +5,27 @@
maxTime="10"
logLevel="1">
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/examples/pygeosxExamples/modifyBoundaryCondition/pkn_example.xml b/examples/pygeosxExamples/modifyBoundaryCondition/pkn_example.xml
index 8d861acab42..5afe9514205 100644
--- a/examples/pygeosxExamples/modifyBoundaryCondition/pkn_example.xml
+++ b/examples/pygeosxExamples/modifyBoundaryCondition/pkn_example.xml
@@ -23,15 +23,10 @@
solidSolverName="lagsolve"
logLevel="1"
flowSolverName="SinglePhaseFlow"
- surfaceGeneratorName="SurfaceGen"
+ surfaceGeneratorName="SurfaceGen"
targetRegions="{ Domain, Fracture }">
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
@@ -162,9 +126,7 @@
-
+
-
+
-
+
-
+
diff --git a/examples/pygeosxExamples/parametricSurfaceMapping/parametricMesh.xml b/examples/pygeosxExamples/parametricSurfaceMapping/parametricMesh.xml
index afd6d585819..37abebebcc3 100644
--- a/examples/pygeosxExamples/parametricSurfaceMapping/parametricMesh.xml
+++ b/examples/pygeosxExamples/parametricSurfaceMapping/parametricMesh.xml
@@ -8,11 +8,8 @@
timeIntegrationOption="QuasiStatic"
discretization="FE1"
targetRegions="{ Region2 }">
-
-
+
+
@@ -35,10 +32,7 @@
maxTime="1.0e-3">
-
+
-
+
-
+
@@ -97,11 +86,8 @@
-
+
-
+
diff --git a/examples/pygeosxExamples/sedovWithStressFunction/modified_sedov.xml b/examples/pygeosxExamples/sedovWithStressFunction/modified_sedov.xml
index 0e5c1e4e52c..2ad1af3f675 100644
--- a/examples/pygeosxExamples/sedovWithStressFunction/modified_sedov.xml
+++ b/examples/pygeosxExamples/sedovWithStressFunction/modified_sedov.xml
@@ -3,22 +3,17 @@
-
+
-
+
-
+
diff --git a/examples/sedovKernelTest.xml b/examples/sedovKernelTest.xml
index 86d6665f189..9e8fc1294b8 100644
--- a/examples/sedovKernelTest.xml
+++ b/examples/sedovKernelTest.xml
@@ -26,10 +26,7 @@
maxTime="1.0e-2">
-
+
-
+
@@ -102,15 +92,10 @@
-
+
-
+
diff --git a/src/coreComponents/integrationTests/xmlTests/include_input.xml b/src/coreComponents/integrationTests/xmlTests/include_input.xml
index 3749cd9290f..15514d80b15 100644
--- a/src/coreComponents/integrationTests/xmlTests/include_input.xml
+++ b/src/coreComponents/integrationTests/xmlTests/include_input.xml
@@ -2,16 +2,12 @@
-
+
-
+
-
+
-
+
diff --git a/src/coreComponents/integrationTests/xmlTests/multifile_input/fieldspec.xml b/src/coreComponents/integrationTests/xmlTests/multifile_input/fieldspec.xml
index 251a5993fab..9eb454bd4d3 100644
--- a/src/coreComponents/integrationTests/xmlTests/multifile_input/fieldspec.xml
+++ b/src/coreComponents/integrationTests/xmlTests/multifile_input/fieldspec.xml
@@ -2,10 +2,8 @@
-
+
-
+
diff --git a/src/coreComponents/integrationTests/xmlTests/multifile_input/mesh.xml b/src/coreComponents/integrationTests/xmlTests/multifile_input/mesh.xml
index 8b8da84f49c..45afb742fe2 100644
--- a/src/coreComponents/integrationTests/xmlTests/multifile_input/mesh.xml
+++ b/src/coreComponents/integrationTests/xmlTests/multifile_input/mesh.xml
@@ -15,9 +15,6 @@
-
+
diff --git a/src/coreComponents/integrationTests/xmlTests/multifile_input/outputs.xml b/src/coreComponents/integrationTests/xmlTests/multifile_input/outputs.xml
index 371078f74c9..9d186e357fb 100644
--- a/src/coreComponents/integrationTests/xmlTests/multifile_input/outputs.xml
+++ b/src/coreComponents/integrationTests/xmlTests/multifile_input/outputs.xml
@@ -2,14 +2,10 @@
-
+
-
+
diff --git a/src/coreComponents/integrationTests/xmlTests/multifile_input/solver.xml b/src/coreComponents/integrationTests/xmlTests/multifile_input/solver.xml
index 66124970c74..25972a3060b 100644
--- a/src/coreComponents/integrationTests/xmlTests/multifile_input/solver.xml
+++ b/src/coreComponents/integrationTests/xmlTests/multifile_input/solver.xml
@@ -11,26 +11,18 @@
-
+
-
+
-
+
diff --git a/src/docs/sphinx/developerGuide/Contributing/CodeStyle.rst b/src/docs/sphinx/developerGuide/Contributing/CodeStyle.rst
index 6d7f78d9b46..12861a0c9b3 100644
--- a/src/docs/sphinx/developerGuide/Contributing/CodeStyle.rst
+++ b/src/docs/sphinx/developerGuide/Contributing/CodeStyle.rst
@@ -171,6 +171,26 @@ While quite extensive, uncrustify does not enforce every example of the preferre
In cases where uncrusitfy is unable to enforce code style, it will ignore formatting rules.
In these cases it is acceptable to proceed with pull requests, as there is no logical recourse.
+XML input files
+===============
+GEOS XML files under ``src`` and ``examples`` are formatted with the Python
+``format_xml`` tool from geos-xml-tools. CI runs this as
+``testXmlFormatCheck`` alongside the uncrustify code-style job.
+The check walks those directories on disk (it does not use git) and skips
+symlinks, so it does not follow ``examples/`` links into ``inputFiles``.
+Leaf blocks that fit in 100 columns are kept on one line; longer blocks and
+parent elements stay multi-line.
+
+From the build directory:
+
+.. code-block:: bash
+
+ make geosx_check_xml_files
+ make geosx_format_all_xml_files
+
+XML formatting is not a replacement for schema validation
+(``make geosx_validate_all_xml_files``).
+
Header Guards
=============
Header guard names should consist of the name `GEOS`, followed by the component name (e.g. dataRepository),
diff --git a/src/pygeosx/pyssle.xml b/src/pygeosx/pyssle.xml
index b5dd7aedee0..1624d8ed78d 100644
--- a/src/pygeosx/pyssle.xml
+++ b/src/pygeosx/pyssle.xml
@@ -26,10 +26,7 @@
maxTime="1.0e-3">
-
+
-
+
-
+
@@ -115,14 +107,10 @@
-
+
-
+
diff --git a/src/pygeosx/unitTests/dataRepositoryTests/pygeosx_only.xml b/src/pygeosx/unitTests/dataRepositoryTests/pygeosx_only.xml
index 085db97cd7d..fcdadc9f9a0 100644
--- a/src/pygeosx/unitTests/dataRepositoryTests/pygeosx_only.xml
+++ b/src/pygeosx/unitTests/dataRepositoryTests/pygeosx_only.xml
@@ -1,17 +1,13 @@
-
-
-
+
+
-
+
@@ -28,10 +24,6 @@
-
+
-
-
\ No newline at end of file
+