Re: [xml] HTML Queryselector in libxml

On Fri, 2012-07-20 at 11:52 -0500, Raymond Irving wrote:
In my opinion it's much easier to use when working with HTML content and
CSS classes.

That might be, but libxml is an XML library. Beware that it also does
not construct a conforming HTML DOM, so your CSS selectors may not
always do what you expect.

I think there might be more interest in an htmlclass() function in
XPath, so that div[htmlclass(@class, "sock")] would match
  <div class="sock">
  <div class="cotton sock order">
and not
  <div class="socks">

I dare say a patch (or external library) to implement CSS level 3
selectors would be considered (it's not up to me).

I didn't say XPath was easier to use, though, I said it was more


Liam Quin - XML Activity Lead, W3C,
Pictures from old books:
Ankh: freenode/#xml
Co-author, 5th edition of âBeginning XMLâ - Wrox, July 2012

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