javascript跨浏览器创建XML对象
var
xmlDoc
=
null
;
function
parseXML
(
xmlUrl
)
{
try
{
//IE
xmlDoc
=
new
ActiveXObject
(
"Microsoft.XMLDOM"
);
xmlDoc
.
async
=
false
;
xmlDoc
.
load
(
xmlUrl
);
}
catch
(
e
)
{
try
{
//
Firefox
,
Mozilla
,
Opera
,
etc
.
xmlDoc
=
document
.
implementation
.
createDocument
(
""
,
""
,
null
);
xmlDoc
.
async
=
false
;
xmlDoc
.
load
(
xmlUrl
);
}
catch
(
e
)
{
try
{
//
google
,
Safari
var
xmlhttp
=
new
window
.
XMLHttpRequest
();
xmlhttp
.
open
(
"GET"
,
xmlUrl
,
false
);
xmlhttp
.
send
(
null
);
xmlDoc
=
xmlhttp
.
responseXML
.
documentElement
;
}
catch
(
e
){
alert
(
e
.
message
+
" EROR"
);
return
;}
}
}
}
相关文档:
第二章:ECMAScript基础
1.当函数无明确返回值时,返回的也是值undefined
function testFunc(){}
alert(testFunc()==undefined);
2.typeof(null)=='object' //true,null可以解释为对象占位符
3.undefined 是声明了变量但未对其初始化时赋予该变量的值,null则用于表示尚未存在的对象。
alert(nu ......
Dynamic Scopes 动态作用域
Both the with statement and the catch clause of a try-catch statement, as well as a function containing eval_r(), are all considered to be dynamic scopes. A dynamic scope is one that exists only through execution of code and therefore cannot be det ......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>five-in-a-raw</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style>
  ......
IsolatedStorageFile:包含文件和数据的独立存储区
dataset数据存储到本地xml文档,代码处理如下
public static void WriteDataToXML(DataSet dataset, string dataname)
{
try
{
IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForAssembly(); / ......
XML学习完了,老师说在面试的时候有可能要问到这些,所以又找了些资料,在MLDN的这段日子里,老师们都把各个面试中有可能要问到的问题都帮我们一一总结,真的很感谢MLDN的全部老师,项目老师帮我们认真的讲解项目,辅导项目,教学老师帮我们认真总结各个技术,感谢,真的是感谢,呵呵,我会努力搞好的
Java中四种XML ......