javascript½âÎö·µ»ØµÄxml¸÷ʽµÄ×Ö·û´®
<script>
var flags ;
if(window.XMLHttpRequest) {
XMLHttpReq = new XMLHttpRequest(); //firefoxÏÂÖ´ÐдËÓï¾ä
}
else if(window.ActiveXObject) {
try{
XMLHttpReq = new ActiveXObject("Msxm12.XMLHTTP");
}catch(e){
try{
XMLHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e) {}
}
}
XMLHttpReq.open("post","getDate.jsp",false);
XMLHttpReq.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded;charset=UTF-8");
XMLHttpReq.onreadystatechange = function () {
var statePending = XMLHttpReq.readyState;
if (statePending == 4&& XMLHttpReq.status==200)
{
if(window.ActiveXObject){
xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
xmlDoc.async = false;
xmlDoc.loadXML(XMLHttpReq.responseText.replace(/(^\s*)/g, ""));
} else if (document.implementation&&document.implementation.createDocument){
XMLHttpReq.open("GET",XMLHttpReq.responseText.replace(/(^\s*)/g, ""),false);
XMLHttpReq.send(null);
xmlDoc = XMLHttpReq.responseXML;
//return new XMLSerializer().serializeToString(xmlDoc);
}
flags = xmlDoc.getElementsByTagName("content");
}
}
XMLHttpReq.send(null);
for(var i =0;i<flags.length;i++)
{
var content = flags[i]; //µÃÒ»¸öcontent½á
Ïà¹ØÎĵµ£º
½â¶ÁPHP DOMDocumentÔÚ½âÎöXMLÎļþÖеÄ×÷ÓÃ
http://developer.51cto.com 2009-12-02 10:39 ØýÃû Áø³Ç²©¿Í ÎÒÒªÆÀÂÛ(0)
PHP DOMDocumentµÄ¹¦Äܷdz£Ç¿´ó£¬ÎÒÃÇÔÚÕâÆªÎÄÕÂÖн«½éÉÜÈçºÎÕýÈ·µÄÔËÓÃPHP DOMDocumentÀ´½øÐÐXMLÎļþµÄ½âÎö¡£Ï£Íû¶ÔÓÖÐèÒªµÄÅóÓÑÓÐËù°ïÖú¡£
ÔÚʹÓÃPHP¶ÔXMLÎļþ½øÐнâÎöµÄʱ ......
<!-- xml¸ñʽ
<foo xmlns="test">
<bar attr='a'></bar>
<bar attr='b'></bar>
<bar attr='c'></bar>
</foo>
-->
<?php
$dom = new DOMDocument();
if (!$dom->load('attr.xml'))
{
echo "load books.xml failed!<br>";
re ......
½øÈëMyEclipse6.XÏÂ
Ð޸ģºeclipse.ini Îļþ
-Duser.language=en
¸Ä³É
-Duser.language=zh
µ¯³öÌáʾ£ºCtrl+"/"
dtd ÃüÃû¿Õ¼äµÄÌáʾÐÅÏ¢
window-->Preference-->xml-->XML Catalog-->add
Location :sql-map-2.dtd
key type :pubic ID
key:-//ibatis.apache.org//DTD SQL Map 2.0//EN (XMLÎļþÃüÃû¿Õ¼ ......
Flex Óë JavaScript ½»»¥£¬Ö÷ÒªÒÀ¿¿FlexµÄExternalInterface£¬ÆäÌṩÁËaddCallBackºÍcall·½·¨.
ÏÂÃæµÄÀý×Ó½«ÑÝʾFlexµ÷ÓÃjavascript£¬ºÍjavascriptµ÷ÓÃFlex¡£
js ´úÂë
-------------------------------------------------------------------------------------------------------------
function hello(param) {
......