0
我怎麼能在這裏適用CDATA在asp.net web服務,例如XML,如我該如何在XML中爲web服務應用CDATA?
<booktitle> data </booktitle>
我有一些符號,如「&」,其抗拒我把它解析到Android。
這裏是我的代碼:
for (int iBookResponse = 0; iBookResponse < dataTable.Rows.Count; iBookResponse++)
{
DataRow dataRow = dataTable.Rows[iBookResponse];
xmlResponse += "<Book>";
xmlResponse += "<BookID>" + dataRow["book_id"].ToString() + "</BookID>";
xmlResponse += "<BookCode>" + dataRow["book_code"].ToString() + "</BookCode>";
xmlResponse += "<BookTitle>" + dataRow["book_title"].ToString()+ "</BookTitle>";
xmlResponse += "</Book>";
}