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

XML¶ÁдÀ࣬CMarkup

//******************** Í·Îļþ  Markup.h  *******************
// Markup.h: interface for the CMarkup class.
//
// Markup Release 11.2
// Copyright (C) 2009 First Objective Software, Inc. All rights reserved
// Go to www.firstobject.com for the latest CMarkup and EDOM documentation
// Use in commercial applications requires written permission
// This software is provided "as is", with no warranty.
#if !defined(_MARKUP_H_INCLUDED_)
#define _MARKUP_H_INCLUDED_
#include <stdlib.h>
#include <string.h> // memcpy, memset, strcmp...
// Major build options
// MARKUP_WCHAR wide char (2-byte UTF-16 on Windows, 4-byte UTF-32 on Linux and OS X)
// MARKUP_MBCS ANSI/double-byte strings on Windows
// MARKUP_STL (default except VC++) use STL strings instead of MFC strings
// MARKUP_SAFESTR to use string _s functions in VC++ 2005 (_MSC_VER >= 1400)
// MARKUP_WINCONV (default for VC++) for Windows API character conversion
// MARKUP_ICONV (default for GNU) for character conversion on Linux and OS X and other platforms
// MARKUP_STDCONV to use neither WINCONV or ICONV, falls back to setlocale based conversion for ANSI
//
#if _MSC_VER > 1000 // VC++
#pragma once
#if ! defined(MARKUP_SAFESTR) // not VC++ safe strings
#pragma warning(disable:4996) // VC++ 2005 deprecated function warnings
#endif // not VC++ safe strings
#if defined(MARKUP_STL) && _MSC_VER < 1400 // STL pre VC++ 2005
#pragma warning(disable:4786) // std::string long names
#endif // VC++ 2005 STL
#else // not VC++
#if ! defined(MARKUP_STL)
#define MARKUP_STL
#endif // not STL
#if defined(__GNUC__) && ! defined(MARKUP_ICONV) && ! defined(MARKUP_STDCONV) && ! defined(MARKUP_WINCONV)
#define MARKUP_ICONV
#endif // GNUC and not ICONV not STDCONV not WINCONV
#endif // not VC++
#if (defined(_UNICODE) || defined(UNICODE)) && ! defined(MARKUP_WCHAR)
#define MARKUP_WCHAR
#endif // _UNICODE or UNICODE
#if (defined(_MBCS) || de


Ïà¹ØÎĵµ£º

Parsing XML from the Net Using the SAXParser


Parsing XML from the Net - Using the SAXParser
http://www.anddev.org/parsing_xml_from_the_net_-_using_the_saxparser-t353.html
What you learn:
You will learn how to properly parse XML
(here: from the net
) using a SAXParser
.
What it will look like:
Description:
0.)
In this tutorial we ......

ÊÖ´òÔ­xml±Ê¼ÇÊÖ³­±¾

1. <?xml version="1.0" encoding="GB2312" standalone="yes" ?>
       1.1 ÕâÊÇxmlµÄÎĵµÉùÃ÷£¬Ò»°ãλÓÚxmlÎļþµÄÊ×ÐС£
       1.2 Êéд¹æ·¶£º<?xmlΪһÌå Ö®¼ä²»ÄÜÓпոñ¡£
       1.3 encodingÊôÐÔ£¬Èç¹ ......

°ÑXMLDocumentת»»³Éxml×Ö·û´®

XMLDocumentÀàÌṩÁ˷ḻµÄÊôÐԺͷ½·¨£¬¿ÉÒÔ°ïÖúÎÒÃÇÇáËÉÍê³ÉxmlµÄ±à¼­¡£µ«ÊÇ£¬Íê³ÉºóµÄxmlºÜ¶àÇé¿öÏ¿ÉÄÜ»¹ÊÇÐèÒªÒÔ×Ö·û´®ÐÎʽ´«µÝ¡£XMLDocumentÓиöSave·½·¨£¬²»½ö¿ÉÒÔ±£´æXMLÎļþÖÁ´ÅÅÌ£¬»¹Äܽ«Æä±£´æÖÁÖ¸¶¨µÄÁ÷£¬È»ºó£¬¾ÍÄÜ´ÓÕâ¸öÁ÷£¨stream£©¶ÁÈ¡ËùÐèÒªµÄ×Ö·û´®ÁË¡£
XmlDocument doc = new XmlDocument();
...
.../ ......

D Busѧϰ£¨°Ë£©£ºÀûÓÃXML¶¨ÒåD BusÖ®ServerµÄÀý×Ó


¡¡¡¡ÔÚ´ËÏȸÐлhttp://blog.chinaunix.net/u3/111961/showart_2187819.html
¡£ÕâÊÇÆª¼«ºÃµÄÎÄÕ¡£
¡¡¡¡ÔÚÉÏ´ÎѧϰÖУ¬ÎÒÃÇдÁËclientСÀý×Ó£¬·Ç³£¼òµ¥£¬¶øÇÒͨ¹ýdbus-binding-toolÉú³ÉµÄÍ·Îļþ£¬·Ç³£¹æ·¶¡£Ïà±ÈÖ´ÐУ¬serverÉÔ΢¸´ÔÓЩ£¬ÈÔȻʹÓÃÉϴεÄxmlÎļþ£¬µ«ÊÇÈ¥µôannotation£¬¸üΪ±¾Ô­Ò»Ð©¡£Îļþwei.xmlÈçÏ£º
& ......

¶ÁxmlÎļþ


ÍøÉÏÌṩµÄһЩ·½·¨±È½Ï¼òµ¥£¬ÎÞ·¨ÊÊÓ¦XMLÎļþµÄ¶¯Ì¬±ä»¯ £¬Ã»°ì·¨Ö»ÄÜ×Ô¼º²éÎĵµÐ´£¬×ÜËãûÀË·Ñʱ¼ä£¬ÓõÄʱºò±ðÍüÁ˼Ó#import
"msxml4.dll"Õâ¸ö¶¯Ì¬Á´½Ó¿âÍøÉϺܺÃÕÒ£¬×Ô¼ºÕÒһϣ¬Ï£ÍûÄܰïÖúÐèÒªµÄÅóÓÑ£¬À§ÁË
::CoInitialize(NULL);
//³õʼ»¯COM
 MSXML2::IXMLDOMDocumentPtr pDoc;
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ