I am new to BIRT and its awesome but I am unable to make a bullet point list where each bullet point is a field from my dataset. Without using any html the datasetfield evaluates but as soon as I add an html tag it will simply show the name of the field.
This
<ul>
<li><value-of> row["SRRI"] </value-of></li>
</ul>
Shows:
row["SRRI"]
But I want it to show the value of row["SRRI"] instead. (Omitting "" does not change the output for me)
I was searching for a solution for a few hours now and I guess its fairly simple but I cannot find a solution on how to tell BIRT that this is not a string.
It sounds like you have a list, and you want to lead each entry with a bullet point. In your report design, you can put a cell in front of your row["SRRI"] value and put what ever bullet image you want there.
Related
I'm developing logs viewer web program with Vue.js
I receive log data with ajax and display it with Slickgrid.
What i need to do is highlighting keyword after searching.
I found some examples highlighting whole cells or row but couldn't find highlighting specific keyword in cell.
ex)When i search a word 'cat', slickgrid shows cells which include 'cat'.
And i need to highlight the word 'cat' in the cell.
Anyone knows how to do this? or any examples??
Thank you.
You'll need to write a custom formatter. See here for an example page. Make sure you're using the 6pac repo - it's up to date, the MLeibman repo is unmaintained now.
Re highlighting a word, you'll need to return HTML from the formatter, and just have a special span to hilight the word, eg:
we will build a <span class="hilight">wall<span/>
It's a tricky business finding a full word, that is making sure it's not part of another word, if that's what you want eg.
did you buy the <span class="hilight">wall<span/>paper yet?
That's a whole 'nother Google search in itself.
I am trying to scrape full reviews from this webpage. (Full reviews - after clicking the 'Read More' button). This I am doing using RSelenium. I am able to select and extract text from the first <p> element, using the code
reviewNodes <- mybrowser$findElements(using = 'xpath', "//p[#id][1]")
which is for less text review.
But not able to extract full text reviews using the code
reviewNodes <- mybrowser$findElements(using = 'xpath', "//p[#id][2]")
or
reviewNodes <- mybrowser$findElements(using = 'xpath', "//p[#itemprop = 'reviewBody']")
It shows blank list elements. I don't know what is wrong. Please help me..
Drop the double slash and try to use the explicit descendant axis:
/descendant::p[#id][2]
(see the note from W3C document on XPath I mentioned in this answer)
As you're dealing with a list, you should first find the list items, e.g. using CSS selector
div.srm
Based on these elements, you can then search on inside the list items, e.g. using CSS selector
p[itemprop='reviewBody']
Of course you can also do it in 1 single expression, but that is not quite as neat imho:
div.srm p[itemprop='reviewBody']
Or in XPath (which I wouldn't recommend):
//div[#class='srm']//p[#itemprop='reviewBody']
If neither of these work for you, then the problem must be somewhere else.
I'm completely rookie in XPath (I don't even know how to paste proper html into this post ;-p) subject and I need some help. I would like to retrieve text which is in quotation marks and put it into a one cell in Google Spreadsheet. Right now I can only retrieve this text into separate cells.
http://imm.io/oLYI
Does string(//tr[class='darkGreen']/td[2]) result in what you want? Your XML fragment looks incomplete and I'm not sure if you only want the contents of the second cell so it's a wild guess if this fits your need.
Basically there is a table with names, edit buttons, and a checkbox at the end column that I want to check on with selenium. But I want to make sure I click on the one I created with selenium and that's where my problems begin.
Using the selenium IDE, the names xpath is
//tr[5]/td[2]
The checkbox is
//tr[5]/td[4]/input
So the text is in column 2 and the box is column 4, and my record would be the 5th one. but I cannot for the life of me get ANY text search to work. Even something basic like
<tr>
<td>storeText</td>
<td>//tr[contains(text(), 'McGowan')]/td[2]</td>
<td>text</td>
</tr>
Even if the text matches identically, it gives me the locator not found error. No matter what combination i use to find xpath by text it has never worked, and ive spent quite a few hours reading every combination out there.
We are using the IDE and the RC in html, so no java or any other exporting.
Thank! (My first post!)
//td[text()='McGowan']/../td/input[#type='checkbox']
Let me know if this works for you!
This might be odd, but the coment below the answer, regarding a random click that let to the answer ---> //tr[contains(., 'text')]/td[3]/a <--- was just randomly verified as exactly what I needed.
Good job guys.
I am new to XPath. I have a html source of the webpage
http://london.craigslist.co.uk/com/1233708939.html
Now I want to extract the following data from the above page
Full Date
Email - just below the date
I also want to find the existence of the button "Reply to this post" on the page
http://sfbay.craigslist.org/sfc/w4w/1391399758.html
Can anyone help me in writing the three XPath expressions for the above three data.
You don't need to write these yourself, or even figure them out yourself. If you use the Firebug plugin, go to the page, right click on the elements you want, click 'Inspect element' and Firebug will popup the HTML in a viewer at the bottom of your browser. Right click on the desired element in the HTML viewer and click on 'Copy XPath'.
That said, the XPath expression you're looking for (for #3) is:
/html/body/div[4]/form/button
...obtained via the method described above.
I noticed that the DTD is HTML 4/01 Transitional and not XHTML for the first link, so there's no guarantee that this is a valid XML document, and it may not be loaded correctly by an XML parser. In fact, I see several tags that aren't properly closed (i.e. <hr>, etc)
I don't know the first one off hand, and the third one was just answered by Alex, but the second one is /html/body/a[0].
As of your first page it's just impossible to do because this is not the way xpath works. In order for an xpath expression to select something that "something" must be a node (ie an element)
The second page is fairly easy, but you need an "id" attribute in order to do that (or anything that can make sure your button is unique). For example if you are sure the text "Reply to this post" correctly identify the button just do it with
//button["Reply to this post"]