--- a/ogr/ogr_xerces_headers.h
+++ b/ogr/ogr_xerces_headers.h
@@ -33,9 +33,9 @@
 #pragma GCC system_header
 #endif
 
-#include <util/PlatformUtils.hpp>
-#include <sax/InputSource.hpp>
-#include <util/BinInputStream.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/sax/InputSource.hpp>
+#include <xercesc/util/BinInputStream.hpp>
 
 #ifdef XERCES_CPP_NAMESPACE_USE
 XERCES_CPP_NAMESPACE_USE
--- a/ogr/ogrsf_frmts/gml/xercesc_headers.h
+++ b/ogr/ogrsf_frmts/gml/xercesc_headers.h
@@ -39,13 +39,13 @@
 #define INFINITY INFINITY_XERCES
 #endif
 
-#include <util/PlatformUtils.hpp>
-#include <sax2/DefaultHandler.hpp>
-#include <sax2/ContentHandler.hpp>
-#include <sax2/SAX2XMLReader.hpp>
-#include <sax2/XMLReaderFactory.hpp>
-#include <sax2/Attributes.hpp>
-#include <sax/InputSource.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/sax2/DefaultHandler.hpp>
+#include <xercesc/sax2/ContentHandler.hpp>
+#include <xercesc/sax2/SAX2XMLReader.hpp>
+#include <xercesc/sax2/XMLReaderFactory.hpp>
+#include <xercesc/sax2/Attributes.hpp>
+#include <xercesc/sax/InputSource.hpp>
 
 #ifdef XERCES_CPP_NAMESPACE_USE
 XERCES_CPP_NAMESPACE_USE
--- a/ogr/ogrsf_frmts/ili/xercesc_headers.h
+++ b/ogr/ogrsf_frmts/ili/xercesc_headers.h
@@ -39,14 +39,14 @@
 #define INFINITY INFINITY_XERCES
 #endif
 
-#include <util/PlatformUtils.hpp>
-#include <sax2/DefaultHandler.hpp>
-#include <sax2/ContentHandler.hpp>
-#include <sax2/SAX2XMLReader.hpp>
-#include <sax2/XMLReaderFactory.hpp>
-#include <dom/DOM.hpp>
-#include <util/XMLString.hpp>
-#include <sax2/Attributes.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/sax2/DefaultHandler.hpp>
+#include <xercesc/sax2/ContentHandler.hpp>
+#include <xercesc/sax2/SAX2XMLReader.hpp>
+#include <xercesc/sax2/XMLReaderFactory.hpp>
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/sax2/Attributes.hpp>
 
 #ifdef XERCES_CPP_NAMESPACE_USE
 XERCES_CPP_NAMESPACE_USE
