Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

½â¾öjQueryÔÚIE6ϱéÀúXMLµÄBug£¡

²Î¿¼²©ÎÄ¡¶IEÏÂÀûÓÃjQuery·ÖÎöXML¡·µØÖ·£ºhttp://www.newmediafun.com/2009/07/parsing-xml-with-jquery-in-internet-explorer/
±¾À´ÒÔΪjQuery»áºÜºÃµÄ½â¾öËùÓÐä¯ÀÀÆ÷¼æÈÝÐÔÎÊÌ⣬µ«ÊÇÕóÍöµÄIE6»¹ÊÇ»áÕÒÂé·³£¡
jQueryʹÓÃAJAXʱ£¬ÔÚIE6϶ÁÈ¡»Ø´«µ½XMLÊý¾Ý»áÓÐÎÊÌ⣬¾ßÌå¿´ÏÂÃæµÄÀý×Ó°É¡£
×¼±¸Êý¾ÝÎļþtest.xml
<ArrayOfManagement_Contact>
<Management_Contact>
<user_id>123457</user_id>
<tel_type>2</tel_type>
<tel>879</tel>
<visibility>0</visibility>
<del_flg>0</del_flg>
<id>537</id>
</Management_Contact>
<Management_Contact>
<user_id>123457</user_id>
<tel_type>2</tel_type>
<tel>54645</tel>
<visibility>0</visibility>
<del_flg>0</del_flg>
<id>538</id>
</Management_Contact>
</ArrayOfManagement_Contact>  
Õý³£Çé¿öÏ¿ÉÒÔʹÓà $.get / $.post£¬µ«ÊÇIEÓиö°²È«ÐÔÏÞÖƵÄÎÊÌ⣬»áʹjQueryÎÞ·¨ÕýÈ·½âÊÍXMLÊý¾Ý£¬ÖÁÓÚʲô°²È«ÐÔ£¬Ã»ÐËȤÉ£¬¾Íµ±bug´¦Àí£¡×÷ÕßÔ­ÎĵĽâÊÍÈçÏ£º
What happens is that the XML gets loaded into IE as a text object, then gets converted into usable XML data. Any other browsers get the XML data directly.
BugÔ­Òò£ºIEÇëÇóXMLÎļþʱ£¬ºó½«Ëü×÷ΪÎı¾¶ÔÏó¼ÓÔØ£¬Ö®ºóÐèÒªÎÒÃÇÊÖ¶¯×ª³ÉXMLÀàÐ͵ÄÊý¾Ý²Å¿ÉÒÔʹÓ㬶øÆäËûä¯ÀÀÆ÷»áÖ±½Ó×°ÔØXMLÀàÐÍÊý¾Ý¡£
ËùÒÔÔÚÏÂÃæµÄ´úÂëÖУ¬solution1ÊÇÎÞ·¨ÕýÈ·¹¤×÷µÄ£¬solution2ÌṩÁ˱äͨµÄת»»·½°¸£¬ÎÊÌâ½â¾ö£¡
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>123123123</title>
<mce:script type="text/javascript" src="jquery-1.3.2.min.js" mce_src="jquery-1.3.2.min.js"></mce:script>
<mce:script type="text/javascript"><!--
function test() {
/*
// solution 1
$.post('test.xml', null, function (data) {
var mydata = data;
alert('my');
alert($(mydata).find("user_id").eq(1).t


Ïà¹ØÎĵµ£º

sqlserver FOR XML PATH Óï¾äµÄÓ¦ÓÃ

´úÂëÈçÏÂ:

DECLARE
@TempTable table(UserID int , UserName nvarchar(50));
insert into
@TempTable (UserID,UserName) values (1,'a')
insert into @TempTable
(UserID,UserName) values (2,'b')

select UserID,UserName
from @TempTable FOR XML PATH
ÔËÐÐÕâ¶Î½Å±¾£¬½«Éú³ÉÈçϽá¹û£º
¸´ÖÆ´úÂë ......

Java and XML_¶ÁÊé±Ê¼Ç_2010 05 16

2010-05-16
Èý¡¢½âÎöXMLÎĵµ
l  Xerces½âÎöÆ÷¡¢SAXÀàºÍ½Ó¿Ú
l  SAXÔĶÁÆ÷
n  Ê×ÏÈÒªµÃµ½Ò»¸ö·ûºÏSAX org.xml.sax.XMLReader½Ó¿Ú¹æ·¶µÄÀý×Ó£¬Õâ¸ö½Ó¿Ú¶¨ÒåÁ˽âÎöÐÐΪ²¢ÔÊÐíÉèÖÃijЩÌØÕ÷ºÍÊôÐÔ¡£¸Ã½Ó¿ÚÌæ»»ÁËSAX1.0ÖеÄorg.xml.sax.Parser
import org.apache.xerces.parsers.SAXParser;
import org.xml. ......

JAVA²Ù×÷XMLµÄÍêÕûÀý×Ó——W3C DOMƪ

ÕâÊÇÒ»¸öÓÃJAVA W3C DOM ½øÐÐXML²Ù×÷µÄÀý×Ó£¬°üº¬Á˲éѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ý¡¢±£´æµÄ»ù±¾²Ù×÷¡£½ÏÍêÕûµÄÃèÊöÁËÒ»¸öXMLµÄÕû¸ö²Ù×÷Á÷³Ì¡£ÊʺϸÕÈëÃÅJAVA XML²Ù×÷µÄÅóÓѲο¼ºÍѧϰ¡£
¼ÙÉèÓÐXMLÎļþ£ºtest1.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
 <book>
  <name>¹þÀï²¨Ì ......

¶àÖÖXML½âÎö·½·¨

±¾ÎĽéÉÜÁ˸÷ÖÖ½âÎö·½·¨£¬×ÅÖØ·ÖÎöÁ˸÷×ÔµÄÓÅȱµã:
½âÎöµÄÖØÒªÐÔ
¡¡¡¡½âÎöΪʲôÖØÒª?ÒòΪËùÓÐ XML ´¦Àí¶¼´Ó½âÎö¿ªÊ¼¡£ÎÞÂÛʹÓø߲ã±à³ÌÓïÑÔ(Èç XSLT)»¹ÊǵͲã Java ±à³Ì£¬µÚÒ»²½¶¼ÊÇÒª¶ÁÈë XML Îļþ£¬½âÂë½á¹¹ºÍ¼ìË÷ÐÅÏ¢µÈµÈ£¬Õâ¾ÍÊǽâÎö¡£
¡¡¡¡½âÎöÎĵµÊ±ÃæÁٵĵÚÒ»¸öÑ¡ÔñÊDzÉÓÃÏֳɵĽâÎö¿â(»ù±¾ÉÏÿÖÖ±à³ÌÓïÑÔ¶¼Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ