Displaying 20 results from an estimated 2000 matches similar to: "Quick XPath question (REXML)"
2007 Jan 23
1
assert_select issue
I''d like to do an assert_select where only ONE of the matching elements
needs to match the :text.
It seems counterintuitive to me to require them *all* to match, which
precludes me from testing the existence of a particular tag (h1) with
some particular text if other instances of the same tag exist.
I know that I can narrow down the field by using more detailed
selectors, but it sure
2024 Sep 17
1
(no subject)
Hmmm... typos and thinkos ?
Maybe:
mean_narm<- function(x) {
m <- mean(x, na.rm = T)
if (is.nan (m)) NA else m
}
-- Bert
On Mon, Sep 16, 2024 at 4:40?PM CALUM POLWART <polc1410 at gmail.com> wrote:
>
> Rui's solution is good.
>
> Bert's suggestion is also good!
>
> For Berts suggestion you'd make the list bit
>
> list(mean = mean_narm)
>
2006 Jun 24
1
Parsing XML with REXML problem
Why can it not find my object? What am i missing here? Here is my code:
require ''rexml/document''
include REXML
# classes to represent the objects and relationships in the xml file
class Article
attr_accessor :id, :post, :archive, :ntype, :head, :blurb, :body,
:fblurb, :fimage, :att, :source, :copy, :brand
end
# the base parser
class BaseXMLParser
def initialize(filename)
2017 Apr 04
1
Re: [PATCH v5 09/10] mllib: add XPath helper xpath_get_nodes()
On Thursday, 23 March 2017 10:02:47 CEST Cédric Bosdonnat wrote:
> This function will allow more OCAML-ish processing of xpath queries
> with multiple results.
s/OCAML/OCaml/
s/xpath/XPath/
> ---
> mllib/xpath_helpers.ml | 9 +++++++++
> mllib/xpath_helpers.mli | 4 ++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/mllib/xpath_helpers.ml
2009 Jun 10
2
add variable in xpath
hi ,
i cant succeed add variable in xpath (libxml)
brand = "037"
xpath = "//Root/Stk[@Category=''601'' and @Brand=#{brand}]"
stack = node.find(xpath)
i used #{brand} but doesnt work
2024 Oct 18
1
DPLYR Multiple Mutate Statements On Same DataFrame
?s 22:50 de 17/10/2024, Sparks, John escreveu:
> Hi R Helpers,
>
> I have been looking for an example of how to execute different dplyr mutate statements on the same dataframe in a single step. I show how to do what I want to do by going from df0 to df1 to df2 to df3 by applying a mutate statement to each dataframe in sequence, but I would like to know if there is a way to execute this
2006 Dec 08
1
XML, XPATH in Centos?
What built in utilities are there that can evaluate XML XPath statements in
CentOS?
Its needed to grab certain info from <a href="some.html">some</a> from a
page with a python, perl or shell script.
Hints on what to use would be appreciated.
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2010 Aug 05
7
Search large XML file -- REXML slower than a slug, regex instantaneous
Got a question hopefully someone can answer -
I am working on functionality to match on certain nodes of a largish (65mb)
xml file. I implemented this with REXML and was 2 minutes and counting
before I killed the process. After this, I just opened the console and
loaded the file into a string and did a regex search for my data -- the
result was almost instantaneous.
The question is, if I can get
2017 Oct 29
2
A query language for LLVM IR (XPath)
Hi, sometimes when dealing with LLVM IR getting to a desired point of
the code is a bit cumbersome, in particular if you're instrumenting
existing code. A lot of nested loops and if checks.
Maybe all of this could be avoided by employing a query language. Since
an LLVM module can be seen as a sort of tree with attributes, I think
that reusing an existing query language for XML would be
2017 Oct 31
2
A query language for LLVM IR (XPath)
As much as I'm not a fan of most XML things, this application of XPath is *inspired*.
This would be a great testing/query tool for tests.
It would also be a great way to prototype passes.
Looking forward to seeing something like this in llvm/tools/ !
Cheers
> On 1 Nov 2017, at 04:00, Sean Silva via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> This is so cool! I once
2015 Nov 12
1
[PATCH] inspector: --xpath: Copy node to new document (RHBZ#1281577).
'virt-inspector --xpath' can segfault.
When run under valgrind, it shows this error:
==2254== Invalid free() / delete / delete[] / realloc()
==2254== at 0x4C29D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==2254== by 0x53BA198: xmlFreeNodeList (tree.c:3690)
==2254== by 0x53B9F65: xmlFreeDoc (tree.c:1247)
==2254== by 0x405BFA: do_xpath (inspector.c:808)
2024 Dec 11
2
Cores hang when calling mcapply
Hi R users.
Apologies for the lack of concrete examples because the dataset is large, and it being so I believe is the issue.
I multiple, very large datasets for which I need to generate 0/1 absence/presence columns
Some include over 200M rows, with two columns that need presence/absence columns based on the strings contained within them, as an example, one set has ~29k unique values and the
2009 Jun 23
1
How to find b entries using xPath?
We got all rows by:
library(XML)
doc =
htmlParse('http://www.statcan.gc.ca/daily-quotidien/090520/t090520b1-eng.htm')
rows = xpathSApply(doc, '//table/tbody/tr')
The last row is:
row_last = rows[15]
row_last
[[1]]
<tr><td id="t1stub17" class="stub1 RGBShade"><b>Unsmoothed composite
leading indicator</b></td>
<td
2011 May 30
1
Need help reading website info with XML package and XPath
Hi, I'm looking for help extracting some information of the zillow website.
I'd like to do this for the general case where I manually change the address
by modifying the url (see code below). With the url containing the address,
I'd like to be able to extract the same information each time. The specific
information I'd like to be able to extract includes the homedetails url,
price
2024 Sep 16
2
(no subject)
Dear Contributors,
I hope someone has found a similar issue.
I have this data set,
cp1
cp2
role
groupid
1
10
13
4
5
2
5
10
3
1
3
7
7
4
6
4
10
4
2
7
5
5
8
3
2
6
8
7
4
4
7
8
8
4
7
8
10
15
3
3
9
15
10
2
2
10
5
5
2
4
11
20
20
2
5
12
9
11
3
6
13
10
13
4
3
14
12
6
4
2
15
7
4
4
1
16
10
0
3
7
17
20
15
3
8
18
10
7
3
4
19
8
13
3
5
20
10
9
2
6
I need to to average of groups, using the values of column
2010 May 17
3
Writing a properly-formed custom type (configxml)
Please hold my hand.
After studying the wiki, several unofficial pages, various mailing list entries, and the operation of the "iptables" type as found on the net, I have created a custom type, lovingly named ``configxml''''.
It updates attributes on the first element matching a supplied XPath in a given XML file. The first use case is configuring Atlassian JIRA to use
2007 Sep 29
2
REXML - XML query only returning one (last) result
I''m really new to Ruby on Rails, and I''m trying to read an XML file
with REXML. No matter what I try, I am only getting the last result
returned from my query. I should be getting 365 results. Here is the
code:
include REXML
require ''rexml/document''
require ''rexml/xpath''
class MakeFootprintController < ApplicationController
def index
2006 Jun 26
0
DBI question. How do I load a database with data parsed from REXML?
I wrote a rexml script that parses rather big xml files (DOM parsing) and
builds an object out of them. This is what it looks like after i parse the
xml file and display the object:
[#<Article:0xb79e7428 @brand="This is a story from ", @id=5337,
@fblurb="burb", @ntype="news type here", @copy="Copyright \302\251 2006 ",
@source="source",
2007 Apr 23
0
backgroundrb and REXML issue
Hi,
I have an application that receives XML files, and then hands each one
off to a backgroundrb worker to parse and store the info. Everything
was working, until I needed to support a larger character set. So I
added the following to the top of my XML files: <?xml version="1.0"
encoding="ISO-8859-1"?>
Adding this worked fine when I tested it without using
2007 Aug 24
1
How to download any file using send_file() method
HI,
I am directory listing and in that listing I have certain files and sub
directories, now when I click on the files it should download that
particular file but I am not able to accomplish it, and I have got to
use send_file() method.
In the send file Code shown below I have made use of the address of one
of the files directly so when I click the link of any file it downloads
it.
THE CODE