[xmlsec] xPath parsing youtube issue

Aleksey Sanin aleksey at aleksey.com
Wed Jun 17 19:33:08 PDT 2009


wrong mailing list

Aleksey

kama168 wrote:
> Hi, all ~
> 
> I got some troubles in using xpath to parse youtube xml page like this 
> linke:
> 
> http://gdata.youtube.com/feeds/api/standardfeeds/top_rated
> 
> I can't get element node under following procedure~plz help me~thx~!
> 
> =================
> 
> doc = xmlReadMemory(buffer, len, "noname.xml", NULL, 0);
> 
> //doc is right, and I can use xmlDocGetRootElement to get root node
> 
> context = xmlXPathNewContext(doc);
> 
> register_namespaces(context, nsList) ;
> 
> result = xmlXPathEvalExpression("/feed/entry", context);
> 
> xmlXPathFreeContext(context);
> 
> xmlXPathNodeSetIsEmpty(result->nodesetval);
> 
> ==> result will be Null
> 
> =================
> 
> LIBXML_DOTTED_VERSION is "2.6.32"
> 
> ps. I can get yahoo weather rss correctly using this procedure.
> 
> 
> 
> ==========================================================
> 6招學會相片修圖合成密技
> http://web.pccenter.com.tw/new_activity/photoshop0905_2/index.asp?selectENT=1&AD_website=W00005&AD_location=234&selectPRO=2 
> <http://mail.pchome.com.tw/edm/click.htm?ad_code=426>
> ==========================================================
> 好想談戀愛那個人會是你嗎
> http://egirl.pchome.com.tw/ 
> <http://mail.pchome.com.tw/edm/click.htm?ad_code=427>
> ==========================================================
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec


More information about the xmlsec mailing list