libxml2¿â½âÎöxmlÎļþ³öÏÖµÄÎÊÌâ
¿Í»§¶Ë´«¹ýÀ´µÄxmlÎļþÀïÃæÓлسµ¡¢»»ÐС¢¿Õ¸ñ·ûºÅ£¬µ¼ÖÂÎÞ·¨½âÎöxmlÎļþ£¬libxml2¿âÀïÃæÓ¦¸ÃÓжԸ¶ÕâÖÖÎÊÌâµÄº¯Êý°É£¿ÎÒ¸Õ½Ó´¥libxml2¿â£¬Çë´ó¼Ò°ï棬ллÁË¡£
ûÃ÷°×£¬XMLÎļþÀïÃæ»Ø³µ»»ÐкͿոñ¶¼ÊǺϷ¨×Ö·û¡£´íÎóÐÅÏ¢ÊÇʲô£¿
{{
Ïà¹ØÎÊ´ð£º
HTML code:
<div id="tessx">
<ALEXA VER="0.9" URL="163.com/" HOME="0" AID="=">
<RLS PREFIX="http://" more="79" ......
ÎÒÔÚʹÓÃDom¶ÁxmlÎļþʱÓöµ½Ò»¸öÎÊÌ⣬¾ÍÊǵ±123.xmlÎļþ²»´æÔÚʱ£¬load(123.xml)¾Í±¨´í£¬ÔõôÑù²ÅÄÜÅжÏÕâ¸öÎļþÊÇ·ñ´æÔÚ°¡£¬ÎÒÒªµÄÊÇ´æÔÚʱ¾Í¶ÁÈ¡£¬²»´æÔÚ¾ÍÌø¹ý£¬¼ÌÐøµÄ¶ÁÏÂÒ»¸öxml£¬Çë½Ì¸÷λ´óÏÀ£¬
$file ......
ÇóÖú¸÷λ´óϺ£¬Ñ§Éú³É¼¨µ¥XML SchemaµÄÉè¼Æ,XMLÎĵµµÄÉè¼Æ£¬°üº¬µÄÖ÷ÒªÐÅÏ¢£ºÑ§ºÅ¡¢Ñ§ÉúÐÕÃû¡¢Ïµ²¿¡¢°à¼¶¡¢¿¼ÊÔÈÕÆÚ¡¢ÈονÌʦ¡¢Ñ§·Ö¡¢Ñ§Ê±¡¢ÐÞϰÀà±ð¡¢Java³ÌÐòÉè¼Æ³É¼¨,ÍøÂç»ù´¡ÖªÊ¶³É¼¨¡¢ÍøÒ³ÖÆ×÷³É¼¨¡¢Èí¼þ¹¤³Ì³ ......
ºÃ ÎÒÏëѧϰXMLºÃÊ飬ÇëÎÊÓÐʲôÊ飬¿ÉÒÔÉîÈëµÄѧϰÏÂµÄ Ð»Ð»
ÎÞ·Ï»°XML ̨ÍåÁ½Ö»ÀÏ»¢
XMLÈëÞµä
ÓÑÇé °ï¶¥¡£
ÎÞ·Ï»°XML ̨ÍåÁ½Ö»ÀÏ»¢ÖªÊ¶µã±È½ÏÉÙ
XML´ÓÈëÃŵ½¾«Í¨
......
ÈçºÎ¶ÔxmlÄÚÈÝÊý¾Ý½øÐбȽÏ
ÀýÈ磺
<?xml version='1.0' encoding='utf-8'?>
<TestLIST>
<PID>40</PID>
<TestName>ÉîÛÚÊÐ</TestName>
......