diff --git a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/JmeterDocumentParser.java index aff168cb46..2a5c083996 100644 --- a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/JmeterDocumentParser.java @@ -1127,6 +1127,9 @@ public class JmeterDocumentParser implements EngineSourceParser { } private void removeChildren(Element node) { - node.setText(""); + List elements = node.elements(); + for (Element ele : elements) { + node.remove(ele); + } } }