Skip to content

Commit 2ad55e8

Browse files
authored
fix : xml 파싱 수정
1 parent 1550c5c commit 2ad55e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/simter/domain/chatbot/service/ClaudeAPIService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ private LocalDateTime generateRandomTime() {
490490
}
491491

492492
private String cleanXmlString(String xml) {
493-
return xml.trim().replaceFirst("^([\\W&&[^<]]+)<", "<");
493+
return xml.trim().replaceAll(">\\s+<", "><").replaceAll("\\s*<", "<").replaceAll(">\\s*", ">");
494494
}
495495
}
496496

0 commit comments

Comments
 (0)