Hello,
In a previous question, user helped me but i'm stuck of doing simple request :
<?php $nodes = $xPath->query('//table[@class="some_class"]');
But it returns me the whole table datas instead of rows of the table, that's why i want to retrive only "td" of the table.
I tryed (but it's not working)
<?php $nodes = $xPath->query('...
How would you find all nodes between two H3's using XPATH?
...
How can I convert this XML
<albums>
<album title="New Zealand">
<album title="Auckland">
<image title="Mt Eden railroad station"/>
<image title="Morgan St"/>
</album>
</album>
<album title="Russia">
<image title="Capital of Siberia"/>
</album>
</albums>
into that
<div cl...
I have a xpath expression that returns a list of urls that are in a table. I now need a way to remove the first tr, is this possible using one xpath expression? FYI the expression looks like this:
form[@id='form1']/div[@id='cont']/div[@id='mycont']/div[@id='holder']/div[@id='resultslist']/div[2]/table//tr/td[2]/a/@href
The relevant...
Continuing my previous question.
XML
<albums>
<album title="new_zealand">
<album title="auckland">
<image title="mt_eden_railroad_station"/>
</album>
</album>
</albums>
Expected output
<div>
<a href="#new_zealand">new_zealand</a>
</div>
<div id="new_zealand">
<a href="#new_zealand/aucklan...
I've got the following structured XML file:
<w:document>
<w:body>
<w:p>
<w:r>
<w:t/>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t/>
</w:r>
</w:p>
<w:p>
<w:r>
<w:instrText/>
</w:r>
</w:p>
...
hi all.
I'm using selenium-client to test a site. I want to get all a tags matching a particular selector, and then get the href attributes back in an array. Can anyone tell me how i can do this? For example, this returns the href of the first matching 'a' tag:
browser.get_attribute "//a[contains(@id,'friendImageLink')]/@href"
=> ...
Given this:
<element_1>
<element_2>Text</element_2>
<element_3>
<element_4>
<element_5>Text with @ in Value</element_5>
</element_4>
<element_4>
<element_5>Test Text</element_5>
</element_4>
</element_3>
<element_6>
<element_7>
<eleme...
Hello!
I am scraping a website that uses Javascript to dynamically populate the content of a website with the Html Agility pack.
Basically, I was searching for the XPATH "\\div[@class='PricingInfo']", but that div node was being written to the DOM via Javascript.
So, when I load the page through the Html Agility pack the XPATH mention...
I have a webbrowser and I use DocumentComplete to read the current document from the WebBrowser (as IHTMLDocument2).
What's the easiest way to run xpath queries in that html doc? I am looking for something easy to use and lightweight.
I am using Visual Studio C++ 2010.
...
I'm currently using JDOM for doing some simple XML parsing, and it seems like nothing's type safe - I had a similar issue with using the built-in Java DOM parser, just with lots more API to wade through.
For example, XPath.selectNodes takes an Object as its argument and returns a raw list, which just feels a little Java 1.1
Are there g...
Considering this HTML code:
<div id="something_unique">
<form action="http://the_needed_link">
</form>
</div>
How do we get the needed link assuming that there is a lot of form tags on the page but we do only need the one that is in a div that has a unique id?
...
I am creating an XSLT and i want to select a particular node, only if one of its child element's value is between a range. The range is to be specified using parameters in the xsl file.
The XML file is like
<root>
<org>
<name>foo</name>
<chief>100</chief>
</org>
<org parent="foo">
<name>foo2</name>
<chief>106</chief>
</org>...
Look at the following two examples:
<foo>some text <bar/> and maybe some more</foo>
and
<foo>some text <bar/> and a last <bar/></foo>
Mixed text nodes and bar elements within the foo element. Now I am in foo, and want to find out if the last child is a bar. The first example should prove false, as there are text after the bar, but ...
How i can check with xpath if e node value is number?
Any ideas?
...
I am navigating this office open xml file using XPath 1.0 (extract):
<sheetData ref="A1:XFD108">
<row spans="1:3" r="1">
<c t="s" r="A1">
<is>
<t>FirstCell</t>
</is>
</c>
<c t="s" r="C1">
<is>
<t>SecondCell</t>
</is>
</c>
...
I cant really formulate that better, so I'll go with an example instead:
XML:
<root>
<foo>
<bar id="1">sdf</bar>
<bar id="2">sdooo</bar
</foo>
<feng>
<heppa id="4">hihi</heppa>
<heppa id="2">sseeapeea</heppa>
<heppa id="1">....</heppa>
</feng>
</root>
XSLT:
<xsl:for-each select="/root/foo/bar">
<p>
...
Hello,
After researching this on SO and google for hours now... I hope to get some help here:
(I am just one step away from running a regex to remove the namespaces completely)
First this is the XML:
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header xmlns="...
For instance, what XPath would return "text one", "text two", and "text three"?
<root>
<item>
<richtext>
<par>
<break />
text one
<break />
text two
<break />
text three
</par>
</richtext>
</item>
</root>
The number of <break/> tags varies.
...
Hi,
I have two XPaths, for example:
/html/body/div[3]/div[4]/table/tbody/tr[2]/td[4] and
/html/body/div[3]/div[4]/table/tbody/tr[2]/td[3]/a[2]
How can I find the first common ancestor now?
In this case it would be /html/body/div[3]/div[4]/table/tbody/tr[2]/.
I found this question but the solution is in ruby and doesn't really give ...