xpath question

bruce bedouglas at earthlink.net
Sun Jul 2 17:37:13 EDT 2006


simon..

you may not.. but lot's of people use python and xpath for html/xml
functionality.. check google "python xpath"...

later..


-----Original Message-----
From: python-list-bounces+bedouglas=earthlink.net at python.org
[mailto:python-list-bounces+bedouglas=earthlink.net at python.org]On Behalf
Of Simon Forman
Sent: Sunday, July 02, 2006 2:10 PM
To: python-list at python.org
Subject: Re: xpath question


bruce wrote:
> hi
>
> is there anyone with XPath expertise here? i'm trying to figure out if
> there's a way to use regex expressions with an xpath query? i've seen
> references to the ability to use regex and xpath/xml, but i'm not sure how
> to do it...
>
> i have a situation where i have something like:
>  /html/table/..../[@class='foo']
>
> is it possible to do soomething like [@class~=/fo/] so i'd match the class
> attribute with fo....
>
> i'm trying to parse HTML/Web docs...
>
> thanks
>
> -bruce

I'll take this one...

Dude,  this is a *python* mailing list, not an xml/xpath/regex one.  In
addition, the regex syntax you're using above (~=/fo/) looks like
*perl* code--  but I wouldn't know 'cause I don't use perl myself.

Now it's entirely possible that there are *many* people here that are
xml/xpath/regex Kung Fu Masters,  *and* it's entirely possible that one
or more of them are about to answer your question informatively and in
exhaustive detail.  It's also entirely possible that this is the most
friendly and informative reply that you're going to get, here.


Try a more appropriate newsgroup, and good luck.

--
http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list