XMLµÄ´´½¨
ÉùÃ÷
/// <summary>
/// XMLÎĵµ
/// </summary>
XmlDocument xmldoc;
/// <summary>
/// XML½Úµã
/// </summary>
XmlNode xmlnode;
/// <summary>
/// XMLÔªËØ
/// </summary>
XmlElement xmlelem;
XmlElement xmlelem2;
XmlElement xmlelem3;
/// <summary>
/// XMLÄÚÈÝ
/// </summary>
XmlText xmltext;
/// <summary>
/// »ù±¾Â·¾¶£¨¸öÈËÎļþ¼Ð¹ÜÀíXML£©
/// </summary>
public static string basicPath = ControlsClass.GetPath(true) + "\\temp\\XMLFile.xml";
if (!File.Exists(basicPath))
{
//´´½¨ÉùÃ÷
&n
Ïà¹ØÎĵµ£º
XML (EXtensible Markup Language)
XML is a
cross-platform, software and hardware independent tool for transmitting
information.
Prolog
XML
Declaration
Processing
Instructions
DOCTYPE
Declaration
Elements
Attributes
XML
Comments
CDATA
Sections
Character
and Entity Refere ......
gloox×Ô¼ºÊµÏÖÁËxmlµÄ½âÎöÄ£¿é£¬Ã»ÓÐÓõ½µÚÈý·½µÄ¿â(tinyXML£¬expat )
Ö÷ÒªÉæ¼°µÄÎļþ:
tag.h (tag.cpp)
taghandler.h
parser.h (parser.cpp)
1. TagÒ»¸öTag¾ÍÊÇÒ»¸öXMLÔªËØ
ÀýÈç:
a.
<book kind='computer'>
<store id='23'/>
<author>
qiang
</author>
</bo ......
XMLÊDZ»Éè¼ÆΪ´æ´¢¡¢´«ÊäÒÔ¼°½»»»Êý¾ÝµÄ¡£XML²»ÊDZ»Éè¼ÆΪÓÃÀ´ÏÔʾÊý¾ÝµÄ¡£
¡¡¡¡XML¿ÉÒÔ½«HTMLÓëÊý¾Ý·ÖÀë
¡¡¡¡Í¨¹ýʹÓÃXML£¬ÄúµÄÊý¾Ý¿É´æ´¢ÓÚHTMLÖ®Íâ¡£
¡¡¡¡µ±ÎÒÃÇʹÓÃHTMLÀ´ÏÔʾÊý¾Ýʱ£¬Êý¾Ý´æ´¢ÓÚHTMLÖС£Í¨¹ýʹÓÃXML£¬Êý¾Ý¿ÉÒÔ±»´æ´¢ÔÚµ¥¶ÀµÄXMLÎļþÖС£ÕâÑù×öµÄ»°£¬Äú¾Í¿ÉÒÔ°Ñ×¢ÒâÁ¦¼¯ÖÐÔÚʹÓÃHTML½øÐÐÊý¾Ý²¼¾Öº ......
ËÄÖÖXML½âÎö·½·¨
xmlÎļþ£º
£¼?xml version="1.0" encoding="GB2312"?£¾
£¼RESULT£¾
£¼VALUE£¾
£¼NO£¾A1234£¼/NO£¾
£¼ADDR£¾ËÄ´¨Ê¡XXÏØXXÕòXX·X¶ÎXXºÅ£¼/ADDR£¾
£¼/VALUE£¾
£¼VALUE£¾
£¼NO£¾B1234£¼/NO£¾
¡¡ ¡¡£¼ADDR£¾ËÄ´¨Ê¡XXÊÐXXÏçXX´åXX×飼/ADDR£¾
£¼/VALUE£¾
£¼/RESULT£¾
1£©DOM
& ......
HTML.htmlÎļþ
<div align="center" class="style1">
<p>±ù¹÷Áбí</p>
<p></p>
<table width="400" border="1">
<tr>
<th scope="col"><font size="4">Æ·ÅÆ</font></th> ......