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

libxml2ÓÃxpath½âÎöxmlÎĵµµÄÎÊÌâ

xmlÎĵµÊ±ÄÚ´æÖеÄÒ»¶Î×Ö·û´®£¬ÏÖÔÚÐèÒªÓÃxpath½âÎö³öÆäÖÐÒ»¸ö½ÚµãµÄÖµ¡£´úÂëÈçÏ£º

C/C++ code:


// buffer ÊÇxmlÎĵµ£¬sizeÊÇÎĵµµÄ³¤¶È¡£
xmlDocPtr pXmlDoc = xmlParseMemory(buffer, size);
xmlXPathContextPtr pPathCtxt = xmlXPathNewContext(pXmlDoc);

string xpathStr = "node1/node2";
xmlXPathObjectPtr pPathObject = xmlXPathEvalExprexxion(xpathStr.cstr(), pPathCtxt );




²»ÖªµÀÊÇÄÄÀï³öÁËÎÊÌ⣬½âÎö³öÀ´µÄpPathObjectÄÜ·µ»ØÕýÈ·µÄÀàÐÍ£¬È´·´²»»Ø¾ßÌåµÄÖµ£»Èç¹û½«xpathStr»»³ËÓëÎĵµÎ޹صÄÈÎÒâxpath±í´ïʽ¾Í¿ÉÒÔÕýÈ·µÄ·µ»Ø½á¹û¡£

Çë½ÌË­Öªµ½Ô­ÒòÂð£¿


Ïà¹ØÎÊ´ð£º

ÈçºÎÌá½»xmlÀàÐÍÊý¾Ý - .NET¼¼Êõ / ASP.NET

Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
  <a>aaa
  </a>
  <b>bbb
  </b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......

php¶ÁÈ¡XMLÊý¾ÝÎÊÌâ

ÎÒÊÇÏëÓÃPHP´ÓÊý¾Ý¿âÖжÁÈ¡Êý¾Ý£¬È»ºóдÈëxml£¬È»ºóFLASHÏÔʾXMLÖеÄÊý¾Ý
µ«ÊDZ¾µØ²âÊÔPHPÄܶÁ³öXML£¬´«µ½¿Õ¼äÀï¾Í¶Á²»³öÀ´ÁË£¬ÇëÎÊÔõô»ØÊÂ?

´íÎó´úÂëÈçÏÂ:
Fatal error: Cannot instantiate non-exis ......

100·ÖÇóÖúJSµÄ½âÎöÒ»¶ÎXML,NETBOX·â×°³ö´í¡£¡£¡£¡£¡£

ÒÔÏ´úÂëÔÚIEÏÂÊÇ¿ÉÒÔÕý³££¬µ«ÊÇÓÃNETBOX·â×°¾Í²»ÐÐÁË£¬ÔËÐе½ºìÉ«µÄµØ·½¾Í³ö´íÁË£¬ËµÈ±ÉÙ¶ÔÏñ£¬ÇëÎÊÔõôÑùÐ޸ġ£


JScript code:

//////////////////// AJAXÀà////////////////
function getxml ......

Çë½ÌÒ»¸ö¹ØÓÚXML¶ÁдµÄÎÊÌ⣿

ÏëÖªµÀÓÃdataset¶ÁдXMLÊÇÔõô°ìµ½µÄ£¬¶øÇÒÔõô´æÈëÊý¾Ý¿â£¿
ÓÃXML¶ÁдÓÖÔõôÄÜʵÏÖ£¿
Çë¸÷λ´óϺ°ï¸öæ~~~£¡
DataSet set = new DataSet();
set.ReadXml()

set.WriteXml

public static DataSet Con ......

ajax²»Äܶ¯Ì¬ÏÔʾxmlÀïµÄÊý¾Ý(ÐÞ¸Ä)

×¢£º
1.ÊÖ¶¯É¾³ýieÁÙʱÎļþºó¿ÉÒÔ»ñÈ¡ÐÂÊý¾Ý£»
2.Ë¢ÐÂÒ³Ãæ²»ÄÜ»ñÈ¡ÐÂÊý¾Ý£»
3.²»ÒªËµ¼ÓËæ»úÊýÔÚurlÉÏ£¬ÎÒ²»ÖªµÀ¾ßÌå¼ÓÔÚÄÄÀÎÒÂÒÊÔÁËÒ²»¹ÊDz»ÐУ»
4.Ï£ÍûµÃµ½µÄЧ¹ûÊǵã»÷¡°»ñÈ¡Êý¾Ý¡±ºó¿ÉÒÔÏÔʾxmlÀï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ