[lxml-dev] About the position of html parsing by HTML Target parser

Nicholas Dudfield ndudfield at gmail.com
Fri Jul 17 12:48:24 CEST 2009


Wow, someone else with this requirement. I was meaning to post to the
list about this. I'm using lxml to implement a XPath / CSS selection
plugin for a python extensible editor. I'd like to have a mapping of
view buffer regions to xml nodes.   The workaround I used to get the
exact character position was to use the feed interface, a character at
a time and manually monitor bytestream position. It's fairly slow
though. I'd like to implement this in CYthon or use whatever
underlying facility there is to speed it up.

You can see some screen casts at this forum thread which should make
it more obvious what I mean re: css / xpath document selections:
http://www.sublimetext.com/forum/viewtopic.php?f=5&t=547

Cheers.


More information about the lxml-dev mailing list