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

ÈçºÎÔÚVC»·¾³Ï±àд³ÌÐò¶ÁÈ¡XMLÎļþ

ÈçºÎÔÚVC»·¾³Ï±àд³ÌÐò¶ÁÈ¡XMLÎļþ?ÇåÌṩԴ´úÂë.лл.
#import <msxml3.dll> named_guids  //µ¼È붯̬¿â£¬×°ÁËIE5¾ÍÓÐ
using namespace MSXML2;     //ÒýÓÃÃüÃû¿Õ¼ä£¬Ò»°ã¿ÉÒÔ°ÑÃüÃû¿Õ¼äÀí½â³ÉÀàºÍ½Ó¿ÚµÄ¼¯ºÏ£¬ºÇºÇ£¬¶Ô²»¶ÔÎÒÒ²²»ÖªµÀÁË
#include <vector>
using namespace std;
struct FIELD
{
public:
 CString  name;
 CString  type;
 CString  length;
 CString  explain;
 CString  allowNull;
 CString  autoIncrease;
};
class Xml
{
public:
 Xml(void);
 ~Xml(void);
private:
 HRESULT hr;
 MSXML2::IXMLDOMDocumentPtr pDoc; //XMLÎĵµ½Ó¿ÚÖ¸Õë
public:
 void AddKey(CString moduleName,CString keyName, CString keyValue);
 CString ReadKeyValue(CString moduleName, CString keyName);
private:
 void NewDocument(CString moduleName, CString keyName, CString keyValue);
public:
 bool ReadTable(CTreeCtrl * tree);
 bool ReadFields(CString tableName,vector<FIELD> &fields);
 bool SaveTable(vector<FIELD> fields,CString tableName,bool bNew);
};
//-------------------------------------------------------------------------------------------------------------------------------------
ÉÏÃæÊÇÍ·Îļþ£¬ÕâÊÇcppÎļþ
#include "StdAfx.h"
#include "xml.h"
Xml::Xml(void)
{
 CoInitialize(NULL);                       //³õʼ»¯COM
 hr=CoCreateInstance(MSXML2::CLSID_DOMDocument,NULL,CLSCTX_ALL,MSXML2::IID_IXMLDOMDocument,(void**)&pDoc); //´´½¨XMLÎĵµÊµÀý
}
Xml::~Xml(void)
{
 CoUninitialize();
}
void Xml::AddKey(CString moduleName,CString keyName, CString keyValue)
{
 CString selectString="AppSetting/"+moduleName;                //XML½Úµã¶¨Î»×Ö·û´®£¬¶¨Î»µ½½ÚµãÃûΪ


Ïà¹ØÎĵµ£º

xml¡¢xsdºÍxslÖ®¼äµÄ¹ØϵºÍʹÓÃʵÀý

¼òµ¥µØ˵£¬xslÊÇ˵Ã÷xmlÈçºÎ±í´ï³öÀ´µÄÑùʽÎļþ£¬¶øxsd¸ø³öxmlÎļþµÄ¸ñʽÃèÊö
Èç¹û˵xmlÊÇÒ»µþ³®Æ±£¬xsd¾ÍÊÇÑé³®»ú£¬¿´¿´ÀïÃæÓÐûÓмٳ®£¬¶øxslÊǵ㳮»ú£¬¿´¿´µ½µ×ÊǶàÉÙÇ®¡£ÓÃxml¿ÉÒÔ²»ÓÃxsd£¬¾ÍÏñ»¨Ç®µÄʱºò²»Ò»¶¨ÒªÑé³®Ò»Ñù£¬µ«ÊÇÊÕÇ®µÄÈËÒ»°ãÊÇÏëÒªÑéµÄ¡£¶ø»¨Ç®µÄʱºò²»Äܲ»µã³®£¬²»µãÄǾͲ»ÊÇ»¨Ç®ÁË£¬ÊÇÍæÇ®¡£µ±È»ÁË£ ......

xml½âÎö

xml
<mime>
<content>
<type>text/plain</type>
<big>357</big>
<text>D:\\cybercourttext2009101410241364.txt</text>
</content>
<content>
<type>text/plain</type>
<big>357</big>
<text>D:\\cybercourttext2009 ......

java½âÎöXMLµÄËÄÖÖ·½·¨

XMLÏÖÔÚÒѾ­³ÉΪһÖÖͨÓõÄÊý¾Ý½»»»¸ñʽ,ËüµÄƽ̨ÎÞ¹ØÐÔ,ÓïÑÔÎÞ¹ØÐÔ,ϵͳÎÞ¹ØÐÔ,¸øÊý¾Ý¼¯³ÉÓë½»»¥´øÀ´Á˼«´óµÄ·½±ã¡£¶ÔÓÚXML±¾ÉíµÄÓ﷨֪ʶÓë¼¼Êõϸ½Ú,ÐèÒªÔĶÁÏà¹ØµÄ¼¼ÊõÎÄÏ×,ÕâÀïÃæ°üÀ¨µÄÄÚÈÝÓÐDOM(Document Object Model),DTD(Document Type Definition),SAX(Simple API for XML),XSD(Xml Schema Definition),XSLT(Exten ......

XMLÊý¾Ýµº¼¼ÊõµÄ×ܽá

  ×î½ü×öµÄÒ»¸öÏîÄ¿ÖÐÔËÓà xml Êý¾Ýµº¼¼Êõ£¬ËùÒÔ°ÑÊý¾Ýµº·½ÃæµÄ֪ʶ×ܽáһϡ£
  XML Êý¾Ýµº £¨ data islands £©¾ÍÊDZ» html Ò³ÃæÒýÓûòÕß°üº¬µÄ xml Êý¾Ý£¬ÊÇ´Ó IE5 ¿ªÊ¼ÒýÈëµÄÒ»Ïî¼¼Êõ¡£¿ÉÒÔͨ¹ý xml ±êÇ©ºÜÇáËɽ«Êý¾Ýµº²åÈëµ½ html ÎĵµÖС£ÄÇôÔõô·ÃÎÊ xml Êý¾ÝµºµÄÊý¾ÝÄØ£¬ºÜ¼òµ¥£¬Í¨¹ý xml µÄ id ¡£ÔÚÒ³ ......

objective c xml½âÎö

    ½ñÌìÔÚCCÉÏ¿´µ½evangelÔÚÕÐÈË£¬ÉÏÃæдÁËÒ»ÌõÊý¾Ý½âÎö£¬ÎÒÏëÓ¦¸Ã¾ÍÊǶÔXMLµÄ½âÎö°É£¬ÔÝÇÒÕâÑùÀí½âÁË£¬ºÇºÇ¡£ÏÂÎçËÑË÷ÁËÒ»µã¶«Î÷×Ô¼ºÅªÁËÒ»¸öXMLÈ»ºó¶Á¶Á¿´¿´£¬ÏÖÔÚ½ö½öÊǶÁ³öÁËһЩ¶«Î÷£¬Ïȱ£´æ´úÂ룬´ýºóÐø¸üУ¡
    Õâ¸öÊÇÎÒ´´½¨µÄxmlÎļþ£¬ÓÃÓÚ²âÊÔÓõģº
<?xml version="1.0" e ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ