Skip to content

Commit 4263a5e

Browse files
Remove root element wrapper when parsing XML string
1 parent 1fb4126 commit 4263a5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bvm/ballerina-runtime/src/main/java/io/ballerina/runtime/internal/TypeConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ public static BDecimal stringToDecimal(String value) throws NumberFormatExceptio
973973
}
974974

975975
public static BXml stringToXml(String value) throws BError {
976-
BXml item = XmlUtils.parse("<root>" + value + "</root>");
976+
BXml item = XmlUtils.parse(value);
977977
return item.children();
978978
}
979979

0 commit comments

Comments
 (0)