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

zzOPENCV XMLº¯ÊýÍêÃÀÖ§³ÖÖÐÎÄ·½·¨

           
XML¼´extensibe markup languageµÄËõд£¬Ò²¾ÍÊÇ¿ÉÀ©Õ¹±êʶÓïÑÔ¡£ÓÉÓÚÆ俪·ÅÐÔ£¬Ô½À´Ô½¶àµÄÈí¼þ²ÉÓÃËü×÷ΪÃèÊöÓïÑÔ£»ÓÉÓÚÆäƽ̨ÎÞ¹ØÐÔ£¬Ô½À´Ô½¶àµÄϵͳ²ÉÓÃËü×÷ΪÊý¾Ý´«µÝÖн顣¼ÆËã»úÐÐÒµÒѾ­°ÑXMLΪÊý¾Ý½»»»µÄ±ê×¼£¬²¢ÌṩÁËÏ൱ÊýÁ¿µÄÖ§³Ö¹¤¾ß¡£µ«ÊÇ£¬C++ÖнâÎöxml»¹ÒÀÈ»²»¹»ÍêÃÀ£¬ÌرðÊǶÔÓÚÖÐÎÄ×Ö·û¼¯µÄÖ§³Ö¡£´ó¼Ò×ÜÊÇÓöµ½¸÷ÖÖÎÊÌ⣬±¾ÎĸĽøÁËOPENCVµÄXML¶Áдº¯Êý£¬Ö§³ÖÖÐÎÄ×Ö·û´®¡£
ÔÚOPENCV¿ª·¢°üÖУ¬´æÔÚ×ŶÁдXMLµÄһϵÁк¯Êý£¬ËäÈ»²¢²»ÍêÉÆ£¬ÓÐЩ¹¦ÄÜ»¹ÓÐǷȱ¡£µ«ÊÇ£¬±ÈÆð¶¯éü¼¸Õ×µÄXML¶Áд¿ª·¢°ü£¨ÈçXerces-C++£©£¬ËüÈÝÒ×ʹÓ㬴úÂëÁ¿Ð¡¡£¶ÔÓÚÔÚ¼ÆËã»úÊÓ¾õÑо¿¹ý³ÌÖеÄÊý¾Ý½»»»ÈÎÎñ£¬ÕâЩ¼òµ¥IOº¯Êý»ù±¾×ã¹»ÁË¡£Î¨Ò»¿ÉϧµÄÊÇ£¬ËüÄ¿Ç°²»Ö§³ÖÖÐÎÄ£¬ÔÚijЩÐèÒªÖÐÎÄ×Ö·û´®µÄ³¡ºÏ£¬ÓÐЩÒź¶¡£Äܲ»ÄÜͨ¹ý¼òµ¥µÄÐ޸ģ¬ÈÃËüÖ§³ÖÖÐÎÄ£¿×÷Õß×öÁËÈçÏÂÊÔÑ飬Ð޸ķ½·¨¼òµ¥¿ÉÐУ¡
Ê×ÏÈ£¬·ÖÎöcxpersistence.cppÖеĺ¯Êý£¬·¢ÏÖÖ»ÐèÒªÐÞ¸ÄÒ»´¦¾ÍÄܹ»ÈÃXMLϵÁк¯ÊýÖ§³ÖÖÐÎÄ[2]¡£Ò²¾ÍÊǼì²â×Ö·ûCÊÇ·ñ¿É´òÓ¡µÄºêcv_isprint¡£¼´½«£º
#define cv_isprint(c)     ((signed char)(c) >= (signed char)' ')
Ì滻Ϊ
#define cv_isprint(c)     ((unsigned char)(c) >= 0x20 )
¾­¹ýһϵÁвâÊÔ£¬·¢ÏÖÕâÑùµÄÐÞ¸ÄÊÇ¿ÉÐеġ£ÔÚdebug°æÍêÈ«Õý³££¬¿ÉÊÇ£¬µ±ÓÃrelease·¢²¼Ê±¡£VC°Õ¹¤ÁË£¬±àÒëµÄ³ÌÐò½øÈëÀàËÆËÀÑ­»·µÄ״̬¡£½Ó×Å£¬½øÈëÂþ³¤µÄrelease°æ±¾ºÍdebug°æ±¾µÄÆÊÎö·ÖÎö[3]¡£±¾ÎÄÀ´×Ô:http: //www.shenlejun.cn.
×îÖÕ£¬µÃµ½½áÂÛ£ºDEBUG°æºÍRELEASE°æµÄÇø±ð£¬ÊÇcxpersistence.cppÖеÄXML½âÎöº¯ÊýÓõ½µÄisdigit()£¬isalpha()£¬isalnum()£¬isspace()µÈC¿âº¯Êý£¬ÆäDEBUG°æºÍRELEASE°æµÄÐÐΪ¾ÓÈ»²»Ò»Ñù¡£½â¾öÕâЩÎÊÌâµÄ;¾¶ºÜ¶à£¬×î¼òµ¥µÄ·½·¨¾ÍÊÇ£¬½«cxpersistence.cppÖÐËùÓеÄ
char c
Ì滻Ϊ
unsigned char c
ͨ¹ýÉÏÊö2´¦Ð޸ģ¬OPENCVµÄXML¶Áдº¯Êý£¬ÍêÈ«Ö§³ÖÖÐÎÄ£¨°üÀ¨¼òÌåºÍ·±Ì壩ÁË¡£ºÇºÇ£¡
²âÊÔ³ÌÐòÈçÏ£º±¾ÎÄÀ´×Ô:ÃÛ·äµçÄÔ.
int sub_test_opencv_xml_write(void)
{
 // ´´½¨Îļþ´æ´¢¶ÔÏó
 CvFileStorage *fs=cvOpenFileStorage("test.xml",0,CV_STORAGE_WRITE);
 // дעÊÍ
 cvWriteComment(fs,"²âÊÔдXMLÎļþ",1);
 
 // ¿ªÊ¼Ð´½á¹¹£¬ÀàÐÍÊÇͼmap£¬Ò²¾ÍÊÇÓÐÃû×ÖµÄÎÞÐò½Úµã¼¯ºÏ
 cvStartW


Ïà¹ØÎĵµ£º

[ת]Android¶ÁдXML£¨Ï£©——´´½¨XMLÎĵµ


Õª×Ô--http://www.moandroid.com/?p=868
¶ÁдXML£¨Ï£©——´´½¨XMLÎĵµ
By: º£ÊÐò×Â¥ | In: Android¿ª·¢
23 ¾Å 2009
ÔÚÇ°ÃæµÄ2ƪÎÄÕÂAndroid¶ÁдXML£¨ÉÏ£©——package˵Ã÷¡¢Android¶ÁдXML£¨ÖУ©——SAXÖÐÏë±Ø´ó¼Ò¶ÔXMLÎļþ¶ÁÈ¡µÄ·½·¨ÒѾ­±È½ÏÊìϤÁË£¬ÔÚÕâÀïÎÒÃǾͲ»¶à˵ÁË£¬Ö±½Ó˵Ã÷ ......

XML³£ÓòÙ×÷

 XMLÔÚÎÒÃǵijÌÐòÖÐÓõ½µÄÔ½À´Ô½¶à£¬ÒòΪËü´æ´¢¡¢¶ÁÈ¡¡¢Ð޸Ķ¼±È½Ï·½±ã¡£
ÏÂÃæÎÒÀ´·ÖÏíÒ»ÏÂXMLµÄ³£ÓòÙ×÷(Ôöɾ¸Ä²é)£¬ÏÂÃæÊdzÌÐòÔËÐÐЧ¹û£º
Ôö(Ôö¼Ó½Úµã°üÀ¨´´½¨XML):
/// <summary>
/// ´´½¨XMLÎĵµ
/// </summary>
/// <param name="path"></param>
......

C# XmlÖÐÓ³ÉäΪÀàÊý¾Ý½á¹¹£¨±¨ÎÄ£©

        [System.Runtime.Serialization.DataMemberAttribute()]
        public Information Archive {
            get {
         &n ......

XMLÎļþ°ó¶¨Êý¾Ý¼¯¿Ø¼þ²Ù×÷

//Êý¾Ý°ó¶¨
    public void DataBind()
    {
        DataSet ds = new DataSet();
        ds.ReadXml(Server.MapPath(@"App_data/dbGuest.xml"));
&nbs ......

XPath,XMLÎĵµ,SelectNodes()ͨÅä·û˵Ã÷


ÀûÓÃXPath¶ÁÈ¡XmlÎļþ
Ö®ËùÒÔÒªÒýÈëXPathµÄ¸ÅÄĿµÄ¾ÍÊÇΪÁËÔÚÆ¥ÅäXMLÎĵµ½á¹¹Ê÷ʱÄܹ»×¼È·µØÕÒµ½Ä³Ò»¸ö½ÚµãÔªËØ¡£¿ÉÒÔ°ÑXPath±È×÷Îļþ¹ÜÀí·¾¶£ºÍ¨¹ýÎļþ¹ÜÀí·¾¶£¬¿ÉÒÔ°´ÕÕÒ»¶¨µÄ¹æÔò²éÕÒµ½ËùÐèÒªµÄÎļþ£»Í¬Ñù£¬ÒÀ¾ÝXPathËùÖƶ¨µÄ¹æÔò£¬Ò²¿ÉÒԺܷ½±ãµØÕÒµ½XML½á¹¹ÎĵµÊ÷ÖеÄÈκÎÒ»¸ö½Úµã.
¡¡¡¡²»¹ý£¬ÓÉÓÚXPath¿ÉÓ¦Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ