IE和FF中读取XML的问题 - Web 开发 / Ajax
源代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Parsing XML Responses with the W3C DOM</title>
<script type="text/javascript">
var xmlHttp;
var requestType = "";
function createXMLHttpRequest()
{
if(window.ActiveXObject)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHttp");
}
else if(window.XMLHttpRequest)
{
xmlHttp=new XMLHttpRequest();
}
}
function startRequest(requestedList)
{
requestType=requestedList;
createXMLHttpRequest();
xmlHttp.onreadystatechange=handleStateChange;
xmlHttp.open("GET","parseXML.xml",true);
xmlHttp.send(null);
}
function handleStateChange()
{
if(xmlHttp.readyState==4)
if(xmlHttp.status==0)
{
相关问答:
我在编写一个wince5.0的程序,想实现把PDA上的一个LIST <STRING>类型的数据序列化为XML,然后在PC上的一个webservice拿到这个XML,转化为Dataset,更新PC上的数据库,我想问怎么把XML传给webservice的呢?
......
如何用ATL窗体应用程序中用System.Xml遍历一个Xml文件
你说的是托管代码?
。
vc可用msxml
http://msdn.microsoft.com/en-us/library/ms767594(VS.85).aspx
MSXML4
//引入msxml4.dll &nbs ......
我用XmlDocument生成XML
XmlElement remarkNode = node.OwnerDocument.CreateElement("remark");
remark1Node.InnerXml = "";
如果InnerXml赋值不为空,则生成的标记是没问题的,比如:<r ......
package com.javabean.xml;
import java.net.MalformedURLException;
import java.net.URL;
import org.dom4j.io.SAXReader;
import org.dom4j.Attribute;
import org.dom4j.Document;
import org.dom4j.Docum ......
xml文件格式如下
XML code:
<?xml version="1.0" encoding="GB2312" ?>
<allproducts version="1.0">
<products>
<product name="prodId&quo ......