VC¶ÁдXMLÎļþ
½ñÌì¶ÔXMLÎļþ½øÐÐÁËһЩ¼òµ¥µÄ¶Áд²Ù×÷£¬ÏÂÃæÀ´¾ßÌåʵÏÖ²½Ö裺
Ê×ÏÈ£º½¨Á¢Ò»¸ö»ùÓÚDialogµÄMFC¹¤³Ì£¬¹¤³ÌÃûΪOperateXML£¬È»ºóÔÚ¶Ô»°¿òÉÏÌí¼ÓÁ½¸ö°´Å¥("Create"ºÍ"GetData"ºÍÒ»¸öListControl
¿Ø¼þ(ÓÃÀ´ÏÔʾÊý¾Ý)£¬Ê×ÏÈÒªµ¼Èë¿âÎļþ
#import "msxml3.dll"
using namespace MSXML2;
Ö÷ÒªÓÃÀ´ÊµÏÖXMLÎļþµÄÏà¹Ø²Ù×÷£¬
Ë«»÷"Create"°´Å¥½øÈë´úÂë±àд£¬´úÂëÈçÏ£º
void COperateXML::OnBtnCreate()
{
// TODO: Add your control notification handler code here
::CoInitialize(NULL); //³õʼ»¯COM
MSXML2::IXMLDOMDocumentPtr pDoc;
MSXML2::IXMLDOMElementPtr xmlRoot;
HRESULT hr = pDoc.CreateInstance(__uuidof(MSXML2::DOMDocument30));
if(!SUCCEEDED(hr))
{
MessageBox("Error");
return;
}
pDoc->raw_createElement((_bstr_t)(char*)"china", &xmlRoot);
pDoc->raw_appendChild(xmlRoot, NULL);
MSXML2::IXMLDOMElementPtr childNode;
pDoc->raw_createElement((_bstr_t)(char*)"city", &childNode);
childNode->Puttext("shanghai");
childNode->setAttribute("population", "7000");
childNode->setAttribute("area", "2000");
xmlRoot->appendChild(childNode);
pDoc->raw_createElement((_bstr_t)(char*)"city", &childNode);
childNode->Puttext("beijing");
childNode->setAttribute("population", "39999");
childNode->setAttribute("area", "3322");
xmlRoot->appendChild(childNode);
pDoc->save("D:\\test.xml");
}
Ë«»÷"GetData"°´Å¥½øÈë´úÂë±àд£¬´úÂëÈçÏ£º
void COperateXML::OnBtnGet()
{
// TODO: Add your control notification handler code here
m_list.DeleteAllItems();
MSXML2::IXMLDOMDocumentPtr pDoc;
HRESULT hr = pDoc.CreateInstance(__uuidof(MSXML2::DOMDocument30));
if(!SUCCEEDED(hr))
{
MessageBox("Error!");
return;
}
pDoc->load("D:\\test.xml");
MSXML2::IXMLDOMElementPtr childNode;
childNode = (MSXML2::IXMLDOMElementPtr)(pDoc->selectSingleNode("//city"));
MSXML2::DOMNodeType nodeType;
childNode->get_nodeType(&nodeType);
MSXML2::IXMLDOMNamedNodeMapPtr pAttrs = NULL;
MSXML2::IXMLDOMNode
Ïà¹ØÎĵµ£º
Integration with the XML Data Type
With the introduction of the XML data type, we wanted to also give FOR XML the ability to generate an instance of XML directly (more precisely, it generates a single row, single column rowset where the cell contains the XML data type instance).
Because of the bac ......
µ±Äã½âÎöXMLʱ£¬ÊÇ·ñ»áÒòΪÃüÃû¿Õ¼äµÄ´æÔÚ¶ø²»Äܵó¥ËùÔ¸ÄØ£¿
java·½Ã棬ºÃ¶àÈËÍƼöÓÃdom4j´¦Àíxml£¬ÎÒÒ²¾Í˵˵ÔÚdom4jÉÏ´¦Àí´øÃüÃû¿Õ¼äµÄxml
xml´úÂëexample: ÔÙ˵ǰÈýÖÖ·½·¨£¬Ò²ÊÇ´ÓÍøÉÏ¿´À´µÄ¡£http://www.cnblogs.com/patrickchen/articles/1188920.html
D: eport.css
µÚÒ»¸ö·½°¸.ÉèÖÃÄãµÄxpathµÄÃüÃû¿Õ¼äsetNamesp ......
×Ý×ø±êºº×Ö˵Ã÷ yAxisName='̨' rotateYAxisName='0'
FusionCharts µÄ XML±êÇ©ÊôÐÔÓÐÒ»ÏÂËÄÖÖÊý¾ÝÀàÐÍ
* Boolean - ²¼¶ûÀàÐÍ£¬Ö»ÄÜΪ1»òÕß0¡£ÀýÈ磺<graph showNames=’1′ >
* Number - Êý×ÖÀàÐÍ£¬Ö»ÄÜΪÊý×Ö¡£ÀýÈ磺<graph yAxisMaxValue=’200′ >
* String - ×Ö·û´®ÀàÐÍ£¬Ö ......
תÔØ×Ô£ºhttp://virgos.javaeye.com/blog/611146
Ò»£®Ç°ÑÔ£º
XMLÊÇ΢Èí.NetÕ½ÂÔµÄÒ»¸öÖØÒª×é³É²¿·Ö£¬¶øÇÒËü¿ÉνÊÇXML Web·þÎñµÄ»ùʯ£¬ËùÒÔÕÆÎÕ.Net¿ò¼ÜϵÄXML¼¼Êõ×ÔÈ»ÏԵ÷dz£ÖØÒªÁË¡£±¾ÎĽ«Ö¸µ¼´ó¼ÒÈçºÎÔËÓÃC#ÓïÑÔÍê³É.Net¿ò¼ÜϵÄXMLÎĵµµÄ¶Áд²Ù×÷¡£Ê×ÏÈ£¬ÎÒ»áÏò´ó¼Ò½éÉÜ.Net¿ò¼ÜÖÐÓëXMLÏà¹ØµÄÃüÃû¿Õ¼äºÍÆäÖеÄÖØÒªÀ ......
<?xml version="1.0" encoding="UTF-8"?>
<company>
<tel>020-12345678-66</tel>
<tel>020-12345678-85</tel>
<introduce>
<![CDATA[
<br/><h1>¹«Ë¾¼ò½é& ......