Friday 15 July 2011

xpath. the correct xpath notation. -


I am creating a webcrapper for information on a webpage. I want the correct xpath notation to get the information

  & lt; Div class = "inner" & gt; & Lt; Div class = "col" & gt; & Lt; H2 & gt; & Lt; A href = "Sale of Land-in-Kadwath-Gampaha-442" & gt; In land terminology & lt; / A & gt; & Lt; / H2 & gt; & Lt; Div class = "meta" & gt; & Lt; Div class = "date" & gt; & Lt; / Div & gt; & Lt; Span class = "range" & gt; Other land & lt; / Span>, & lt; Span class = "location" & gt; Gampaha & lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt;   

How do I use the "land in the cave" using the ExDath?

Usage of this function:

  & lt; Xsl: function name = "markup: is-class" as = "xs: boolean" & gt; & Lt; Xsl: param name = "l" as "element ()" /> & Lt; Xsl: Ultimate name = "class-name" such as "item ()" /> & Lt; Xsl: Select Sequence = "$ el / @ class and tokenize (upper-case (normal-place ($ el / @ class)), '') = upper-case (string ($ square-name))" / & Gt; & Lt; / XSL: Function & gt;   

You can do this:

  * [markup: is-class (., 'Inner')] / * [markup: is-class] (, 'Kernel')] // h2 / string ()   

adjust accordingly according to your reference node.

No comments:

Post a Comment