1.XML一次性拼接
Select XMLElement("Patients",
XMLAgg(XMLElement("Patient", XMLAttributes('V0564545' As "No"),
XMLForest('2016052401' As "住院号", '2019052401' As "门诊号", '1254' As "病人ID")))) As "PatientList"
From Dual;
-->>>结果:
--<Patients><Patient No="V0564545"><住院号>2016052401</住院号><门诊号>2019052401</门诊号><病人ID>1254</病人ID></Patient></Patients>