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

xml½âÎö



 
ʹÓÃSAX½âÎöºÍDOM½âÎöµÄʵÀý
ÊÕ²Ø



document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
var text = clipboardData.getData("text");
if (text && text.length > 300) {
text = text + "\r\n\n±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£º" + location.href;
clipboardData.setData("text", text);
}
}, 100);
}
}

DOM½âÎö
    
private
 
static
 
void
 dom() 
throws
 ParserConfigurationException, SAXException, IOException {
        
//´´½¨dom¹¤³§
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        
//´´½¨dom½âÎöÆ÷
        DocumentBuilder db = dbf.newDocumentBuilder();
        
//½«XMLÎĵµ½âÎöµ½ÄÚ´æÖÐ
        Document doc = db.parse(
"bac.xml"
);
    
        NodeList list = doc.getElementsByTagName(
"student"
);
        
for
(
int
 i = 
0
; i < list.getLength(); i++) {
//Ñ­»·±éÀúÔªËؽڵã
            No


Ïà¹ØÎĵµ£º

¹ØÓÚxmlʹÓõĸÐÎò

н¨xmlÎļþµÄÇé¿ö¿ÉÄܲ»¶à£¬µ«¶Ô½Úµã¡¢ÊôÐÔµÄÔöɾ¸Ä²é»áºÜ³£¼û
 XmlDocument xmlDoc = new XmlDocument();
        xmlDoc.Load(Server.MapPath("data.xml"));
ÕâÁ½¾äÓ¦¸ÃºÜ³£Óõģ¬¼ÓÔØÒѾ­´æÔÚµÄxmlÎĵµ¡£
XmlNode root;//¸ù½Úµã
root = xmldoc.DocumentElement;//»ñÈ¡¸ù½ ......

XMLÎļþѧϰ

XML CDATA Îı¾
ËùÓÐ XML ÎĵµÖеÄÎı¾¾ù»á±»½âÎöÆ÷½âÎö¡£
Ö»ÓÐ CDATA Çø¶Î£¨CDATA section£©ÖеÄÎı¾»á±»½âÎöÆ÷ºöÂÔ¡£
Parsed Data
XML ½âÎöÆ÷ͨ³£»á½âÎö XML ÎĵµÖÐËùÓеÄÎı¾¡£
µ±Ä³¸ö XML ÔªËر»½âÎöʱ£¬Æä±êÇ©Ö®¼äµÄÎı¾Ò²»á±»½âÎö£º
<message>´ËÎı¾Ò²»á±»½âÎö</message>
½âÎöÆ÷Ö®ËùÒÔÕâô×öÊÇÒòÎ ......

Ajax ºÍ XML: ÎåÖÖ³£¼û Ajax ģʽ

Asynchronous JavaScript + XML£¨Ajax£©ÎÞÒÉÊÇ 2006 Äê×îÈÈÃŵļ¼ÊõÊõÓÇÒÓÐÍûÔÚ
2007 µÃµ½½øÒ»²½·¢Õ¹¡£µ«ÊǶÔÄúµÄÓ¦ÓóÌÐòÀ´ËµËü¾¿¾¹ÓÐʲôÒâÒåÄØ£¿Ajax Ó¦ÓóÌÐòÖÐÄÄÒ»ÖÖ³£¼û¼Ü¹¹Ä£Ê½Ó¦ÓÃ×î¹ã·ºÄØ£¿±¾ÎĽ«½éÉÜÎåÖÖ³£¼û
Ajax Éè¼Æģʽ£¬¿ÉÒÔʹÓÃËüÃÇ×÷Ϊ¹¤×÷µÄ»ù´¡¡£
µÄÈ·£¬Ajax
ÊÇ Web 2.0
ÈÈÃÅÊõÓËùÓÐÈ˶¼Ï£Íû ......

ÀûÓÃSqlHelper(ExecuteXmlReaderʹÓÃ)£¬×ª»»µ½xml¸ñʽ

ÀûÓÃsqlhelperÖеÄExcuteXmlReader·½·¨£¬¶ÁÈ¡Êý¾Ý²¢±£´æΪxmlÎļþ     
 string strConn = Properties.Settings.Default.Connections;
           SqlConnection connection = new SqlConnection(strConn);
    & ......

XML ½âÎöc++Ô´Â루ͷÎļþ£©

/*
 * XMLTool.h ÅäÖÃÎļþ½âÎö¶¯Ì¬¿âÍ·Îļþ
 *  Ö÷ÒªÊä³öº¯Êý½Ó¿Ú·Ö±ðʵÏÖ¶ÔÅäÖÃÎļþµÄ¶ÁÈ¡ºÍдÈ룬Õë¶Ô½á¹û¼¯µÄ¸´ÖÆÇå¿Õ£¬ºÍÁ½¸ö×Ö·û´®´¦Àíº¯Êý
 *  ¶ÁÈ¡ÅäÖÃÎļþ½Ó¿Ú £ºint ReadXMLFile(XML_Node_Vector *XmlNodeVector, string filepath);
 *  Ð´ÈëÅäÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ