Tuesday, July 04, 2006

Some ordered thoughts on Gnosis enhancements and XPath

I had dropped out of the blogging habit after Feb this year, mainly due to work pressures at office. I think it is time for me to dust out my blogging brush and start painting my blog a little bit, at least to touch up some of the loosing sheen here and there :-)

This is about a nice little utility called Gnosis utils which provides powerful XML parsing in very little code. The library is written by Dr. David Mertz who is a known authority on Python programming matters and has written some charming articles in his "Charming Python" series for IBM developerworks.

I was looking around for an XML API which provides powerful XPath parsing capabilities out of the box some time in March for a project I am doing at Spikesource. PyXML woefully lacks in this department. ElementTree, though a very good API for generic XML processing, falls short on its XPath support (no attributes etc).

Gnosis provides decent XPath support - it supports attributes, text searches but does not support attribute values, the [@attr] syntax etc.

During my work, I enhanced Gnosis XML to support some of the XPath 1.0 specs it do not support. These include,

o Support for //elem[@attr] syntax
o Search attributes by value - i.e support //elem[@attr=value] syntax
o Support //elem[last()]
o Support XPath searches in the root node

The good thing is that I have been able to extract out the Gnosis XML processing parts to a single module and add these enhancements on top of it. I plan to enhance this with the full XPath 1.0 specifications within a month or so and release it to public domain.

I hope this will address the existing void of lightweight pure Python APIs with full XPath support. The whole thing will fit inside a single module which should make it easy to use and extend.

Looking forward to completing this work!

13 comments:

Anonymous said...

T.O.P (Teen Outreach Project)

T.O.P recruits and trains youth between the ages of 13 to 16 to identify and develop initiatives to address sexual health issues among their peers in their community.

Volunteer Opportunities



teenage mutant ninja turtles
teen bbs
teen hitchhikers
teen pics
tiny teens
teen cheerleaders

Anonymous said...

Wow, I stumbled into this blog post on one of my pet peeves.Just today I was wondering whether I should be using libxml's Python bindings. It's supposed to be pretty good.

In fact I was so desparate to get XPath support, at work, I wrote my own on top of the DOM support in the standard python library. Good to know that there is stuff other than Elementtree. I will check it out. But even with this, there are areas like XSLT, XQuery that are left untouched by the py libs.

Anonymous said...

usaa car insurance
compare car insurance
aarp car insurance
car insurance rats
teen car insurance
car accident insurance
car insurance in new jersey
nj car insurance
car
insurance philadelphia

low cost car insurance
antique car insurance
car insurance quote canada
young driver car insurance
car insurance coverage
general car insurance
affordable car insurance
admiral car insurance
tesco car insurance
teen car insurance
car insurance houston
diamond car insurance
diamond car insurance
car insurance broker
car insurance
compare car insurance rate
car
insurance philadelphia

california car insurance
progressive car insurance quote
direct line car insurance
texas car insurance

http://cheap-car-insurance.quickfreehost.com

Random Keyword: :)
rental car insurance

Anonymous said...

Your article is very informative and helped me further.

Thanks, David

Anonymous said...

MESSAGE

Anonymous said...

MESSAGE

Anonymous said...

MumsOnline - Where Parents Talk is a growing parenting community who believes that the best support is that which is given by others who have been in the same situation!

Every day we see 'experts' peddling advice on a variety of subjects from community to community but most of whom have never had any experiences in such subjects.

Things like child rearing cannot be discussed by academics, it is a 'forged in the fires of experience' subject. As such, our community website is an invaluable asset to parents, new and old (or parents to be!).

Visit us today to gain a wealth of knowledge in a niche lifestyle, and perhaps come away with some new friends!

Anonymous said...

MESSAGE

Anonymous said...

[url=http://fradalitassociates.co.uk/logs/cheap-airplane-tickets.html]cheap airplane tickets[/url]

Anonymous said...

[url=http://rockville-md-insur22.l2.prettymob.com/rockville-md.html]rockville md[/url]
[url=http://home-for-sale-in-ohio-insur22.l2.prettymob.com/home-for-sale-in-ohio.html]home for sale in ohio[/url]
[url=http://mercedes-cars-insur22.l2.prettymob.com/mercedes-cars.html]mercedes cars[/url]
[url=http://rv-6-for-sale-insur22.l2.prettymob.com/rv-6-for-sale.html]rv 6 for sale[/url]
[url=http://apartments-homes-insur22.l2.prettymob.com/apartments-homes.html]apartments homes[/url]
[url=http://john-deere-health-plan-insur22.l2.prettymob.com/john-deere-health-plan.html]john deere health plan[/url]
[url=http://health-insurance-for-kids-insur22.l2.cssmob.com/health-insurance-for-kids.html]health insurance for kids[/url]
[url=http://tree-house-real-estate-insur22.l2.prettymob.com/tree-house-real-estate.html]tree house real estate[/url]
[url=http://houses-for-sale-in-naples-florida-insur22.l2.prettymob.com/houses-for-sale-in-naples-florida.html]houses for sale in naples florida[/url]

Anonymous said...

[url=http://www.volny.cz/cheap-tickets/travel/index.html].[/url][url=http://www.volny.cz/cheap-tickets/travel/index1.html].[/url][url=http://www.volny.cz/cheap-tickets/travel/index2.html].[/url][url=http://www.volny.cz/cheap-tickets/travel/index3.html].[/url][url=http://www.volny.cz/cheap-tickets/travel/index4.html].[/url][url=http://www.volny.cz/cheap-tickets/travel/index5.html].[/url][url=http://www.volny.cz/cheap-tickets/travel/index6.html].[/url][url=http://www.volny.cz/cheap-tickets/travel/index7.html].[/url][url=http://www.volny.cz/cheap-tickets/travel/index8.html].[/url][url=http://www.volny.cz/cheap-tickets/travel/index9.html].[/url][url=http://www.volny.cz/cheap-tickets/travel/index10.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index11.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index12.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index13.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index14.html]..[/url]
[url=http://www.volny.cz/cheap-tickets/travel/index15.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index16.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index17.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index18.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index19.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index20.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index21.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index22.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index23.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index24.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index25.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index26.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index27.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index28.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index29.html]..[/url]
[url=http://www.volny.cz/cheap-tickets/travel/index30.html]. .[/url][url=http://www.volny.cz/cheap-tickets/travel/index31.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index32.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index33.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index34.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index35.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index36.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index37.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index38.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index39.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index40.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index41.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index42.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index43.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index44.html]..[/url]
[url=http://www.volny.cz/cheap-tickets/travel/index45.html]..[/url]
[url=http://www.volny.cz/cheap-tickets/travel/index46.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index47.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index48.html]..[/url][url=http://www.volny.cz/cheap-tickets/travel/index49.html]..[/url]

[url=http://www.volny.cz/cheap-tickets/travel/air-tickets-online.html]air tickets online[/url]

Anonymous said...

Technology, IT News, Hits Technology

Anonymous said...

Pretty good info. I have a free expiring domain
articles site. It pretty much covers everything I know about ##KEYWORD##.

Come and check it out if you get time :-)