[lxml-dev] Patch for xpathgrep.py
Pete Forman
pete.forman at westerngeco.com
Tue Jun 10 09:38:07 CEST 2008
Thomas Schraitle <tom_schr at web.de> writes:
> On Montag, 9. Juni 2008, Pete Forman wrote:
>> Thomas Schraitle <tom_schr at web.de> writes:
>> > To spread the word about lxml and xpathgrep.py: I've wrote a small
>> > article here:
>> > http://lizards.opensuse.org/2008/06/09/query-your-xml-with-xpathgrep
>> >py/
>>
>> Something has prettified away your apostrophes (with an e) in the
>> //chapter[not(@id)]/title example.
>
> Strange. I can see it with the apostrophes in Firefox and
> Konqueror. Maybe some font issue in your browser?
Those are typographically correct left and right single quotation
marks U+2018 and U+2019. However the command line shell needs an
apostrophe U+0027. Copy and paste from the browser to the command
line will not work.
I see single quotation marks in Opera, FF and IE, and viewing source:
<p>Now this reduces the above output just to the wanted chapter
titles. And I can extent my query just for all chapters that
doesn’t have an id attribute:</p>
<p><code>$ <strong>xpathgrep.py</strong>
‘//chapter[not(@id)]/title’ db.xml</code></p>
<p>(You need the apostroph because of the shell.)
The listing of File db.xml is similarly affected.
--
Pete Forman -./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
pete.forman at westerngeco.com -./\.- the opinion of Schlumberger or
http://petef.22web.net -./\.- WesternGeco.
More information about the lxml-dev
mailing list