xml Convert special character

Entity Reference Character

& &

&lt: <

&gt >

&quot; "

&apos; '
阅读更多

SyntaxError: illegal XML character

11-14

下面是自己的代码rnrnjavascript代码:rnfunction initialize() rn var latlng = new google.maps.LatLng(34.397, 108.644);rn var myOptions = rn zoom: 5,rn center: latlng,rn mapTypeId: google.maps.MapTypeId.HYBRIDrn ;rn var map = new google.maps.Map(document.getElementById("map_canvas"),rn myOptions); rn rn <% GetRootIDArray(); %>; rn rn var loction = [];rn var markers = [];rn for (i = 0; i < mycars.length; i++) rn location[i] = new google.maps.LatLng(mycars[i][0], mycars[i][1]);rn marker = new google.maps.Marker(rn position: location[i],rn map: maprn );rn markers.push(marker);rn rn for (var i = 0; i < markers.length; i++) rn markers[i].setMap(map);rn rnrnrngoogle.maps.event.addDomListener(window, 'load', initialize);rnrnrnaxpx框架代码:rnrnrn samplern rn rn rn rn rnrnrn rn rn 基于Google Maps的世界地震展示与查询系统rn rn rn rn rn rn rn rn rnrnrnrnrnaxpx.cs代码:rnnamespace WebApplication1rnrn public partial class _Default : System.Web.UI.Pagern rnrn private ConnectGDB connectGDB;rnrn protected void Page_Load(object sender, EventArgs e)rn rn rn rnrn protected void GetRootIDArray()rn rnrn connectGDB = new ConnectGDB();rn if (!connectGDB.connectDB())rn rn return;rn rn string str = "select longitude, latitude from EQ19918+";rn DataTable dt = connectGDB.getTable(str);rn System.Text.StringBuilder text = new System.Text.StringBuilder();rnrn Response.Write("var mycars=new Array();");rnrn for (int i = 0; i < dt.Rows.Count; i++)rn rn text.AppendFormat("mycars[0] = new Array('1','2');", i.ToString(), dt.Rows[i]["jingdu"].ToString(), dt.Rows[i]["weidu"].ToString());rn rnrn text.Remove(text.Length - 1, 1);rn Response.Write(text);rnrn connectGDB.closeDB();rnrn rnrn rnrnrnrnrnrn在vs2008中:rn <% GetRootIDArray(); %>; 这个地方提示应为表达式rnrnrn在火狐浏览器中有如下错误:rnrnSyntaxError: illegal XML characterrnhttp://localhost:2907/JS/HelloWorld.jsrnLine 11rnrnrnrnrn请大神指教是什么问题,谢谢

没有更多推荐了,返回首页