XMLÎļþµÄ½âÎö££libxml¿âº¯Êý½âÊÍ
libxml£¨Ò»£©
ÕªÒª
LibxmlÊÇÒ»¸öÓÐÃâ·ÑÐí¿ÉµÄÓÃÓÚ´¦ÀíXML¡¢¿ÉÒÔÇáËÉ¿çÔ½¶à¸öƽ̨µÄCÓïÑÔ¿â¡£Õâ¸öÖ¸ÄÏÌṩËüµÄ»ù±¾º¯ÊýµÄÀý×Ó¡£
Ð÷ÂÛ
LibxmlÊÇÒ»¸öʵÏÖ¶Á¡¢´´½¨¼°²Ù×ÝXMLÊý¾Ý¹¦ÄܵÄCÓïÑÔ¿â¡£Õâ¸öÖ¸ÄÏÌṩÀý×Ó´úÂë²¢¸ø³öËü»ù±¾¹¦ÄܵĽâÊÍ¡£ÔÚÕâ¸öÏîÄ¿µÄÖ÷Ò³ÉÏÓÐLibxml¼°¸ü¶à¹ØÓÚËü¿ÉÓõÄ×ÊÁÏ¡£°üº¬ÓÐÍêÕûµÄAPIÎĵµ¡£Õâ¸öÖ¸Äϲ¢²»ÄÜÌæ´úÕâЩÍêÕûµÄÎĵµ£¬µ«ÊDzûÃ÷¹¦ÄÜÐèҪʹÓÿâÀ´Íê³É»ù±¾²Ù×÷¡£
Õâ¸öÖ¸ÄÏ»ùÓÚÒ»¸ö¼òµ¥µÄXMLÓ¦Óã¬ËüʹÓÃÎÒдµÄһƪÎÄÕÂÉú³É£¬Ëü°üº¬ÓÐÔªÊý¾ÝºÍÎÄÕµÄÖ÷Ìå¡£
±¾Ö¸ÄÏÖеÄÀý×Ó´úÂëʾ·¶ÈçºÎ×öµ½£º
• ½âÎöÎĵµ
• È¡µÃÖ¸¶¨ÔªËصÄÎı¾
• Ìí¼ÓÒ»¸öÔªËؼ°ËüµÄÄÚÈÝ
• Ìí¼ÓÒ»¸öÊôÐÔ
• È¡µÃÒ»¸öÊôÐÔµÄÖµ
Àý×ÓµÄÍêÕû´úÂë°üº¬ÔÚ¸½Â¼ÖÐ
Êý¾ÝÀàÐÍ
Libxml¶¨ÒåÁËÐí¶àÊý¾ÝÀàÐÍ£¬ÎÒÃǽ«·´¸´Åöµ½ËüÃÇ£¬ËüÒþ²ØÁËÔÓÂÒµÄÀ´Ô´ÒÔÖÂÄã²»±Ø´¦ÀíËü³ý·ÇÄãÓÐÌض¨µÄÐèÒª¡£xmlChar Ìæ´úchar,ʹÓÃUTF-8±àÂëµÄÒ»×Ö½Ú×Ö·û´®¡£Èç¹ûÄãµÄÊý¾ÝʹÓÃÆäËü±àÂ룬Ëü±ØÐ뱻ת»»µ½UTF-8²ÅÄÜʹÓÃlibxmlµÄº¯Êý¡£ÔÚlibxml±àÂëÖ§³ÖWEBÒ³ÃæÓиü¶à¹ØÓÚ±àÂëµÄÓÐÓÃÐÅÏ¢¡£
XmlDoc °üº¬ÓɽâÎöÎĵµ½¨Á¢µÄÊ÷½á¹¹£¬xmlDocPtrÊÇÖ¸ÏòÕâ¸ö½á¹¹µÄÖ¸Õë¡£
xmlNodePtr and xmlNode °üº¬µ¥Ò»½áµãµÄ½á¹¹xmlNodePtrÊÇÖ¸ÏòÕâ¸ö½á¹¹µÄÖ¸Õ룬Ëü±»ÓÃÓÚ±éÀúÎĵµÊ÷¡£
½âÎöÎĵµ
½âÎöÎĵµÊ±½ö½öÐèÒªÎļþÃû²¢Ö»µ÷ÓÃÒ»¸öº¯Êý£¬²¢ÓдíÎó¼ì²é¡£ÍêÕû´úÂ룺¸½Â¼C, KeywordÀý³Ì´úÂë
¢ÙxmlDocPtr doc;
¢ÚxmlNodePtr cur;
¢Ûdoc = xmlParseFile(docname);
¢Üif (doc == NULL ) {
fprintf(stderr,"Document not parsed successfully. \n");
return;
}
¢Ýcur = xmlDocGetRootElement(doc);
¢Þif (cur == NULL) {
fprintf(stderr,"empty document\n");
xmlFreeDoc(doc);
return;
}
¢ßif (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
fprintf(stderr,"
Ïà¹ØÎĵµ£º
<package name="struts" extends="struts-default">
<!-- class Ϊ¸ÃactionʵÏÖµÄÀà -->
<action name="login" class="struts2.loginaction">
......
×°FrameWorkǰûÓÐ×°¹ýIIS£¬ºóÀ´Òª·¢²¼£¬×°ÉÏIISÒÔºó³öÏÖÎÊÌâ¡£ÎÊÌâÈçÏÂͼ£º
ÔÚÍøÉÏÕÒµ½ÁËһЩ½â¾ö°ì·¨
½â¾ö°ì·¨Ò»£º
´ò¿ªvs.netÃüÁîÌáʾÐУ¬
ÊäÈëaspnet_regiis -ir -enable
½â¾öµôÁË£¬¾ßÌåµÄ²ÎÊýµÄÒâ˼ÇëÊäÈëaspnet_regiis help²éѯ
½â¾ö°ì·¨¶þ£ºÔËÐÐvs2005ÃüÁîÐУ¨¿ªÊ¼¡¢ËùÓгÌÐò¡¢vs2005¡¢tools£¬Ð´µÃ²»×¼È·£©£ ......
Ò»¸öxmlÎļþµÄÀý×Ó¡¡¡¡ÏÖÔÚÎÒÃÇÔÝÇÒʹÓÓ¼Çʱ¾”À´´´½¨ÎÒÃǵÄxmlÎļþ°É¡£ÏÈ¿´Ò»¸öxmlÎļþ£º
¡¡¡¡Àý1
¡¡¡¡——————————————————————
¡¡¡¡¡´?xml version="1.0" encodin ......
protected void Page_Load(object sender, EventArgs e)
{
try
{
&nbs ......