ÍøÒ³´ÓxmlÎļþÖжÁÊý¾Ý
xmlÎļþÈçÏ£º<?xml version="1.0" encoding="gb2312"?>
<Èí¼þ¹ÜÀíϵͳ>
<¹ÜÀíÔ±>
<Óû§Ãû>Ã÷ÈտƼ¼</Óû§Ãû>
<ÃÜÂë>123456</ÃÜÂë>
<µØÖ·>³¤´ºÊÐ</µØÖ·>
</¹ÜÀíÔ±>
<¹ÜÀíÔ±>
<Óû§Ãû>Ã÷ÈÕÈí¼þ</Óû§Ãû>
<ÃÜÂë>789654</ÃÜÂë>
<µØÖ·>³¤´ºÊÐ</µØÖ·>
</¹ÜÀíÔ±>
</Èí¼þ¹ÜÀíϵͳ>
ÔÚbody²¿·ÖµÄ´úÂ룺
<xml id="xmlid" src="index.xml" mce_src="index.xml"> <!-- Á´½ÓXMLÎļþ -->
</xml>
<table datasrc="#xmlid" width="450" bgcolor="#CCCCFF" border="5" cellspacing="0" cellpadding="0">
<thead>
<td width="150" align="center" height="25"><span class="STYLE1">Óû§Ãû</span></td>
<td width="150" align="center" height="25"><span class="STYLE1">ÃÜÂë</span></td>
<td width="150" align="center" height="25"><span class="STYLE1">µØÖ·</span></td>
</thead>
<tr>
<td height="25" align="center" class="STYLE2"><SPAN datafld="Óû§Ãû"></SPAN></td>
<td height="25" align="center" class="STYLE2"><SPAN datafld="ÃÜÂë"></SPAN></td>
<td height="25" align="center" class="STYLE2"><SPAN datafld="µØÖ·"></SPAN></td>
</tr>
</table>
Ïà¹ØÎĵµ£º
XmlDocument doc = new XmlDocument();
XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "GB2312", null);
doc.AppendChild(dec);
//´´½¨Ò»¸ö¸ù½Úµã£¨Ò»¼¶£©
XmlElement root = doc.CreateElement("First");
doc.AppendChild(root);
//´´½¨½Úµã£ ......
×î³£¼ûµÄXMLÊý¾ÝÀàÐÍÓУºElement, Attribute£¬Comment, Text.
Element, Ö¸ÐÎÈç<Name>Tom<Name>µÄ½Úµã¡£Ëü¿ÉÒÔ°üÀ¨£ºElement, Text, Comment, ProcessingInstruction, CDATA, and EntityReference.
Attribute, Ö¸ÔÚ<Employee id=”12345”>ÖеĴÖÌ岿·Ö¡£
......
ÄܶÁдÈκÎXMLÅäÖÃÎļþ£¬ÄÜʵÏÖÓû§²ãÃæµÄ¼Ó½âÃÜ£¬ÒÔÏ´úÂëÖеÄB64Eº¯ÊýΪ¼ÓÃܺ¯Êý£¬B64DΪ½âÃܺ¯Êý£¬¿ÉÒÔ×Ô¼º±àд
Éú³ÉµÄXML¸ù½ÚµãΪZBS£¬¿ÉÒÔÌæ»»ÎªÆäËüÓÐÒâÒåµÄ½ÚµãÃû³Æ
Option Explicit
Public xmlDoc As DOMDocument
Public aNode As IXMLDOMElement 'µ±Ç°¼¤»îNode
Public xmlFilePath As String, ReadOnly As Bo ......
/*
* history
*
* Created on 2003-5-26
*
* 2003-06-05
* 1.Ôö¼ÓÁËLogµÄ´¦ÀíÐÅÏ¢¡£
* 2.Å׳öµÄÒì³£ÓÉÔÀ´UtilExceptionµÄ¸Ä±ä³ÉXMLException£¬ºóÕ߼̳ÐǰÕß¡£
*
* 2003-09-02 by David Yu
* 1.Ôö¼ÓÁ˸ıäÒ»¸ö ......