在xml的代碼中僅會對\r\n的\r進行轉換,變成
 \n,然后data的換行效果可以正常實作,但是如果回傳的data只有\n,換行效果消失,多行內容會變成一行輸出。
想問:
1. 為什么僅對\r進行轉換,\n不會變成
;?
2. xml是否無法實作僅有\n的換行效果,必須\r\n一對使用?
用SoapUI call webservice后,http log的顯示:
Fri Mar 06 17:09:42 CST 2020:DEBUG:<< "Some of the images are partially degraded by artefact.[\n]"
Fri Mar 06 17:09:42 CST 2020:DEBUG:<< "No definite intraluminal lesion nor extrinsic compression of the trachea and main bronchi demonstrated. [\n]"
Fri Mar 06 17:09:42 CST 2020:DEBUG:<< "There is apparent prominence over lateral wall of oropharynx ? significance, suggest clinical correlation.[\n]"
Fri Mar 06 17:09:42 CST 2020:DEBUG:<< "Bulging appearance seen nasopharynx, features could be related to adenoids.[\n]"
Fri Mar 06 17:09:42 CST 2020:DEBUG:<< "Slightly hyperintense signal seen anterior superior mediastinum, features consistent with prominent thymus, probably normal variation in this age group.[\n]"
Fri Mar 06 17:09:42 CST 2020:DEBUG:<< "Multiple lymph nodes seen both sides of neck, features could be variation appearance in this age group.</report_content><linked_rpt_message/></result></ePR_rad_exam_text_report></return></ns2:getEPRRadExamTextReportResponse></S:Body></S:Envelope>"
頁面顯示:(會變成一大段)
MRI Trachea and Main Bronchi:Clinical Information:Recurrent spasmodic croup, need to r/o congenital upper airway/trachea obstruction like vascular ring. Sequences:Axial FL T1, HATSE T2, TRUFI T2.Coronal FL T1, TRUFI T2.Sagittal FL T1. Findings:Some of the images are partially degraded by artefact.No definite intraluminal lesion nor extrinsic compression of the trachea and main bronchi demonstrated. There is apparent prominence over lateral wall of oropharynx ? significance, suggest clinical correlation.Bulging appearance seen nasopharynx, features could be related to adenoids.Slightly hyperintense signal seen anterior superior mediastinum, features consistent with prominent thymus, probably normal variation in this age group.Multiple lymph nodes seen both sides of
正常有換行效果顯示的SoapUI回傳結果:(
\n)
Fri Mar 06 17:58:58 CST 2020:DEBUG:<< "<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Header><work:WorkContext xmlns:work="http://oracle.com/weblogic/soap/workarea/">rO0ABXdbACN3ZWJsb2dpYy5hcHAuRVBSX0VOUVVJUllfR0VUUkFEX1dTUwAAANYAAAAjd2VibG9naWMud29ya2FyZWEuU3RyaW5nV29ya0NvbnRleHQABzIuMC4wLjEAAA==</work:WorkContext></S:Header><S:Body><ns2:getEPRRadExamTextReportResponse xmlns:ns2="http://epr_enquiry_getrad_wss.epr.ha.org.hk/"><return><?xml version="1.0" encoding="BIG5"?><ePR_rad_exam_text_report><result_status>000</result_status><in_record_key>EXAMVHM294944500002</in_record_key><result><master_record_key>EXAMVHM294944500002</master_record_key><last_updated_dtm>2009-02-16 10:43:01</last_updated_dtm><last_endorsed_dtm>2009-02-16 10:43:01</last_endorsed_dtm><first_endorsed_by>Elaine Au</first_endorsed_by><first_endorsed_dtm>2009-02-16 10:43:01</first_endorsed_dtm><second_endorsed_by/><second_endorsed_dtm/><report_content>Testing report.
[\n]"
Fri Mar 06 17:58:58 CST 2020:DEBUG:<< "
[\n]"
Fri Mar 06 17:58:58 CST 2020:DEBUG:<< "Intestine, Transrectal</report_content><linked_rpt_message/></result></ePR_rad_exam_text_report></return></ns2:getEPRRadExamTextReportResponse></S:Body></S:Envelope>"
頁面顯示:
Testing report.
Intestine, Transrectal
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/85688.html
標籤:XML/XSL
