[prev in list] [next in list] [prev in thread] [next in thread]
List: opensolaris-opengrok-discuss
Subject: Re: [opengrok] Getting results in structured format
From: Chandan <Chandan () Sun ! COM>
Date: 2009-09-21 18:31:47
Message-ID: 4AB7C693.6000209 () Sun ! COM
[Download RAW message or body]
Dave Purrington wrote:
> Is there a way for me to get search results in structured format? Documentation \
> seems scant (or at least, I can't find it). The features page says OpenGrok \
> supports RSS but search results don't provide an RSS link. Open search is ok too, \
> although my path through that is less clear, just because the format is more \
> obscure.
The rendered HTML output is actually structured XML[1].
If you examine the source of a results page, you may recognize
that it is structured.
For examples, results are contained within a
<div id="results">
A result file is contained within a
<td class="f">
Line numbers for matched lines are in
<span class="l">12</span>
It may not be difficult to write a XSLT transformation that can be
programmatically used to retrieve just the needed information
- a neat alternative to webscrapping.
[1] Note that the results page does not pass validation when tested
with http://validator.w3.org/ - these are bugs.
Thanks,
-Chandan
_______________________________________________
opengrok-discuss mailing list
opengrok-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic