xpath: find the element with the attribute AND contains?

I am writing selenium tests, and I need to switch to an iframe with no id or name and which parent element contains variable id's (so not helpful. Also, the src attribute has variable data in it as well, so I can't target it directly like By.cssSelec

R XML xpath queries return NULL or list ()

I would like to extract data as dataframes from an XML file available under: http://www.uniprot.org/uniprot/P43405.xml I only get back empty string although I think that the xpath queries are okay. library(RCurl) library(XML) url <- "http://www.un

Modify XPath expressions via Java?

I have XPath expressions of the type //*[@id='test-id' and @some-other-attribute='some-value']. I want to convert it into //*[@resourceId='android:id/test-id' and @some-other-attribute='some-value']. I can't seem to find any library function to do th

How to use XPath in WebBrowser Control?

In C# WinForms sample application, I have used WebBrowser control. I want to use JavaScript XPath to select single node. To do this, I use XPathJS But with the following code, the returned value of vResult is always NULL. bool completed = false; WebB

How to count the number of attributes of a node?

In XSL, how to count the number of attributes of a node? For example: <a/> has zero attribute. <a foo="1"/> has one attribute. <a foo="1" bar="2"/> has two attributes.Simply count(@*) for any element. XML In

java - xpath to get rows inside a table

I have an html file like: http://scholar.google.gr/citations?user=v9xULZwAAAAJ&hl=el In this file exist a table with articles. I want to get the first 20 articles (if exist) with xpath. I try to find fist article: String str = (String) xpath.evaluate

Selenium IDE can not find components

I'm testing an ADF application with Selenium IDE. At one point, the automated test case has to click on a button, which has a partialTrigger attribute pointing to a table on the page and after the button executes some background logic, the table is p

How can I get the node I want from XML

<?xml version="1.0" encoding="utf-8" ?> <Root> <Fruits> <Fruit>hahahaha</Fruit> </Fruits> </Root> If I try this code, string[] cFruitName; int i=0; XmlDocument a= new XmlDocument(); a.LoadXml(g

How much performance increases with XPath streaming

Just read the article "Streaming XPath Parser for WSO2 ESB". I was wondering how much the performance increases with this implementation compared to the previous implementation. Are there any numbers available on this?This is the results of the

Scrapy: html xpath selector returns the result in html?

How do I retrieve all of the HTML contained inside a tag? hxs = HtmlXPathSelector(response) element = hxs.select('//span[@class="title"]/') perhaps = hxs.select('//span[@class="title"]/html()') html_of_tag = ? EDIT: if I look at the do

Select a unique value from xml with xpath

I don't really know a lot about xml , How do I select "Hello" or "world" with XPath? <Site> <Row> <Title>Hello</Title> <Bigtext>World</Bigtext> <Smalltext>Test</Smalltext> </Row> &l

XSL if other condition

I have a requirement where I'd like to have if else statement to check whether a node has attributes or it has just string. Eg: 1 of the node has 0 File(s) found and the other has attribs such as <autoincludesystem_info mdate='08/23/2011' mtime='09:5

Selection of plain text xml

Given xml like this: <container> <item> <xmlText> <someTag> <otherTag> Text </otherTag> </someTag> </xmlText> </item> <container> I would like to select all text that is under item/xmlText. I wou

How can I reference array values ​​in string.Format?

I am using XPath to exclude certain nodes within a menu. I want to expand on this to exclude nodes identified within an array. This works to exclude all the nodes in the menu with id 2905 whose type is not content: XmlNodeList nextLevelNodeList = cur

help understand XPath

I have such xpath expression : link[@rel='alternate' and @type='text/html' or not(@rel)]/@href | link/text() ? Acctually I don't understand the symbol |The pipe ( | ) in XPath combines expressions. So this will return the href attribute for link elem

What is the best XPath or Linq2Xml

What is the "best" way to search in xml? Xpath or Linq2xml. I'm asking this because we need to do a lot of searching in xml. I'm always using XPath (since I've been using this from .NET 1.1). But with the introduction of Linq you can easely use

Filtering a structure in XML by attribute

I have a nested simple XML structure that I load with PHP's simpleXML. Some elements of the structure contain "context" attributes. <tab context="new_item, edit_item"> <input type="text" context="new_item"&

c # xpath with an OR

I have the following XML: <users> <user> <location>ny</location> <status>1</status> </user> <user> <location>nj</location> <status>1</status> </user> <user> <location&g

How to capture only part of an ID?

I'm trying to capture the id of an element that will be randomly generated. I can successfully capture the value of my element id like this... | storeAttribute | //div[1]@id | variableName | Now my variable will be something like... divElement-12345