[xml] xmlParseFile and xmlns



When using xmllib to parse an rss feed that includes an unquallified xml namespace the document will include nothing. Are we meant to be doing something special before calling xmlParseFile (or another similar function)?

For example using a feed from youtube
http://gdata.youtube.com/feeds/base/standardfeeds/top_favorites?client=ytapi-youtube-index&time=today&v=2
included within is(editted for length):
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' >

Feeding any similar feed through a barebones test program with an xmlParseFile and xpath operation for something like //item
there are no hits.
Upon deleting [xmlns='http://www.w3.org/2005/Atom'] it works fine, all the items are picked up.

I've spent most of the day trying to help a non-english speaking colleague with this, but as I myself am originally not familiar with the library I've not had too much luck even after reading through the tutorials and checking the API reference and ml
archives.

If anyone knows what causes this issue and how to get around it correctly I would really appreciate any solution/explanation that could be given.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]