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

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 version="1.0" encoding="UTF-8" ?>
<node name="/com/wei/MyObject">
  <interface name="com.wei.MyObject.Sample">
    <method name="Test">
      <arg name="x" type="u" direction="in" />
      <arg name="d_ret" type="d" direction="out" />
    </method >
  </interface >
</node >
¡¡¡¡¿Í»§¶ËС³ÌÐòÉÏ´Îѧϰ¸ø³ö£¬ÕýºÃÓÃÓÚʵÑé¡£ÏÂÃæÏêϸ½²Êö²½Öè¡£
²½ÖèÒ»£ºÉú³ÉÍ·Îļþ
dbus-binding-tool --mode=glib-server --prefix=com_wei wei.xml > wei_server.h
¡¡¡¡×¢Ò⣬--prefixÊDz»¿ÉȱÉٵIJÎÊý£¬ÔÚÓÐЩÎÄÕÂÖУ¬Ã»ÓÐÌáµ½Õâ¸ö£¬ÖÁÉÙÎÒÔÚMoblinµÄ²Ù×÷ϵͳÖвâÊÔÊÇÐèÒªµÄ¡£Í¨³£À´½²£¬¶ÔÓÚÏîÄ¿£¬Ò²ÐèÒªÌṩһ¸öÇø·ÖµÄÃüÃû¿Õ¼ä£¬ÎÞÂÛÊÇ·ñ±ØÐ룬½¨Òé¼ÓÉÏ¡£"--prefix"²ÎÊý¶¨ÒåÁ˶ÔÏóǰ׺¡£Éè¶ÔÏóǰ׺ÊÇ$(prefix)£¬ÔòÉú³ÉµÄDBusGObjectInfo½á¹¹±äÁ¿Ãû¾ÍÊÇdbus_glib_$(prefix)_object_info¡£
Éú³ÉÁËÍ·Îļþwei_server.hÈçÏÂ:
/* Generated by dbus-binding-tool; do not edit! */
#ifndef __dbus_glib_marshal_com_wei_MARSHAL_H__
#define __dbus_glib_marshal_com_wei_MARSHAL_H__
#include    <glib-object.h>
G_BEGIN_DECLS
#ifdef G_ENABLE_DEBUG
#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
#define g_marshal_value_peek_char(v)     g_value_get_char (v)
#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
#define g_marshal_value_peek_int(v)      g_value_get_int (v)
#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
#define


Ïà¹ØÎĵµ£º

ʹÓÃLibxml2²Ù×÷XMLÎĵµ

Ò»¡¢Libxml2½éÉÜ£º
Libxml2 ÊÇÒ»¸öxmlµÄcÓïÑÔ°æµÄ½âÎöÆ÷£¬±¾À´ÊÇΪGnomeÏîÄ¿¿ª·¢µÄ¹¤¾ß£¬ÊÇÒ»¸ö»ùÓÚMIT LicenseµÄÃâ·Ñ¿ªÔ´Èí¼þ¡£Ëü³ýÁËÖ§³ÖcÓïÑÔ°æÒÔÍ⣬»¹Ö§³Öc++¡¢PHP¡¢Pascal¡¢Ruby¡¢TclµÈÓïÑԵİ󶨣¬ÄÜÔÚWindows¡¢Linux¡¢Solaris¡¢MacOsXµÈƽ̨ÉÏÔËÐС£¹¦ÄÜ»¹ÊÇÏ൱ǿ´óµÄ£¬ÏàÐÅÂú×ãÒ»°ãÓû§ÐèÇóûÓÐÈκÎÎÊÌâ¡£
¶þ¡ ......

Android£¨Èý£©Êý¾Ý´æ´¢Ö®XML½âÎö¼¼Êõ

½ñÈÕ¼ÌÐøѧϰAndroidÖÐʹÓÃPullµÄXML½âÎö¼¼ÊõʵÏÖ¶ÔXMLÎļþµÄ½âÎöºÍ´´½¨¡£ÓÉÓÚÃ÷ÌìÐÝÏ¢£¬Ê±¼ä±È½Ï³äÔ££¬ËùÒÔÎÒÒ²½«×òÌìδ×ܽáµÄSAX½âÎö¼¼ÊõÔÚ´Ë×ö¸ö×ܽᡣ
Ò»¡¢SAX½âÎö¼¼Êõ
SaxʹÓõÄÊÇʼþÇý¶¯µÄÁ÷ʽ½âÎö¼¼Êõ¡£Ê¼þÇý¶¯µÄÁ÷ʽ½âÎö·½Ê½ÊÇ£¬´ÓÎļþµÄ¿ªÊ¼Ë³Ðò½âÎöµ½ÎĵµµÄ½áÊø£¬²»¿ÉÔÝÍ£»òµ¹ÍË¡£µ±½âÎöµ½ÎĵµµÄ¿ªÊ¼»ò½áÊø¡ ......

ʹÓà aspx Ò³Ãæ·µ»Ø xml ¸ñʽµÄֵʱ£¬ÐèҪעÒâд·¨

½â¾öÁË£¬ÊÇ1¥˵µÄ·½·¨£¬²»ÄÜд³É
context.Response.ContentType = "xml";
±ØÐëÒªÊÇ
context.Response.ContentType = "text/xml";
¾ÍOKÁË¡«
ʵÀý£º
  Response.ContentType = "text/xml";
            Page.Response.Write("<?xml version=\"1.0\" ......

ASP.NET/XMLÉîÈë±à³Ì¼¼Êõ

ÕâÊǹØÓÚAsp.Net/XMLÉîÈë±à³ÌµÄ¼¼ÊõÊ飬×÷Õß¾«ÐÄÉè¼ÆÁË66¸öʵÀýÏêϸ½éÉÜÁË.Net   FrameworkÒÔ¼°XML¼¼ÊõÔÚ.Net   FrameworkµÄ±à³Ì·½·¨ºÍ¼¼ÇÉ¡£È«ÊéÓÉ12Õ¹¹³É£¬ÄÚÈÝ°üÀ¨.Netƽ̨µÄ½¨Á¢¡¢Asp.NetµÄWeb   Forms¡¢¿Ø¼þ¡¢Êý¾Ý·ÃÎÊ¡¢Web   Service¡¢Asp.NetµÄÉèÖú͸ú×Ù¡¢Asp.NetµÄ°²È« ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ