[Lldb-commits] [lldb] [lldb] Parse XML files without the deprecated SAX1 API (PR #222974)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 11 08:50:20 PDT 2026


https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/222974

SAX1 is deprecated, switch to SAX2 instead.

>From 813f21a9cd18495cab177497a553c2221660891a Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Fri, 11 Sep 2026 15:59:02 +0100
Subject: [PATCH] [lldb] Parse XML files without the deprecated SAX1 API

---
 lldb/source/Host/common/XML.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/source/Host/common/XML.cpp b/lldb/source/Host/common/XML.cpp
index f480ef3166a44..5bef7a371f1a6 100644
--- a/lldb/source/Host/common/XML.cpp
+++ b/lldb/source/Host/common/XML.cpp
@@ -45,7 +45,7 @@ bool XMLDocument::ParseFile(const char *path) {
 #if LLDB_ENABLE_LIBXML2
   Clear();
   xmlSetGenericErrorFunc((void *)this, XMLDocument::ErrorCallback);
-  m_document = xmlParseFile(path);
+  m_document = xmlReadFile(path, nullptr, 0);
   xmlSetGenericErrorFunc(nullptr, nullptr);
 #endif
   return IsValid();



More information about the lldb-commits mailing list