Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.8
-
None
-
None
-
os : window 10
jdk : 1.8
groovy : 3.0.8
Description
sorry. I can't Wirte English.
groovy version : 3.0.8 : not work.
groovy version : 2.5.14 : work
Test Code ;
import groovy.xml.XmlSlurper
import groovy.xml.XmlUtil
def xml = '''<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:n="http://shopn.platform.nhncorp.com/"><soapenv:Body><n:GetOptionResponse><n:ResponseType>SUCCESS</n:ResponseType><n:ResponseTime>19</n:ResponseTime><n:Version>2.0</n:Version><n:Timestamp>2021-06-11T05:30:25.55Z</n:Timestamp><Option><n:ProductId>5606052622</n:ProductId><n:SortType>CRE</n:SortType><n:Combination><n:Names><n:Name1>🎁4개이상 구매시 10% 추가할인</n:Name1></n:Names><n:ItemList><n:Item><n:Id>18011522941</n:Id><n:Value1>닭가슴살 11g X 5개입</n:Value1><n:Price>0</n:Price><n:Quantity>99998</n:Quantity><n:Usable>Y</n:Usable></n:Item><n:Item><n:Id>18011522943</n:Id><n:Value1>북어 11g X 5개입</n:Value1><n:Price>0</n:Price><n:Quantity>99999</n:Quantity><n:Usable>Y</n:Usable></n:Item><n:Item><n:Id>18011522945</n:Id><n:Value1>참치 11g X 5개입</n:Value1><n:Price>0</n:Price><n:Quantity>99998</n:Quantity><n:Usable>Y</n:Usable></n:Item><n:Item><n:Id>18011522947</n:Id><n:Value1>열빙어 11g X 5개입</n:Value1><n:Price>0</n:Price><n:Quantity>99998</n:Quantity><n:Usable>Y</n:Usable></n:Item></n:ItemList></n:Combination><n:DeliveryAttribute><n:Type>TODAY</n:Type></n:DeliveryAttribute></Option></n:GetOptionResponse></soapenv:Body></soapenv:Envelope>
'''
def parse = new XmlSlurper().parseText(xml)
println(parse) // xml parsing work.
def recoverXml = XmlUtil.serialize(parse)
println(recoverXml) // error. ( unicode : 0xd83c error )
thank.