xpath

extract href values containing keyword using XPath in python

百般思念 提交于 2021-01-28 10:33:06
问题 I know variants of this question have been asked a number of times but I've not been able to crack it and get what I want. I have a website which has a few tables in it. The table of interest contains a column where each row contains the word Text hyperlinked to a different page. Here is a specific example from the first row on the above linked page: <a href="_alexandria_RIC_VI_099b_K-AP.txt">Text</a> This is the general pattern: <a href="_something_something-blah-blah.txt">Text</a> Right now

extract href values containing keyword using XPath in python

假装没事ソ 提交于 2021-01-28 10:32:04
问题 I know variants of this question have been asked a number of times but I've not been able to crack it and get what I want. I have a website which has a few tables in it. The table of interest contains a column where each row contains the word Text hyperlinked to a different page. Here is a specific example from the first row on the above linked page: <a href="_alexandria_RIC_VI_099b_K-AP.txt">Text</a> This is the general pattern: <a href="_something_something-blah-blah.txt">Text</a> Right now

Storing information from td tags with a specific width, in python

喜你入骨 提交于 2021-01-28 10:25:45
问题 I am trying to store all the information from the td tags that have width="82" or maybe there is a more efficient method. <a name="AAKER"> </a> <table border="" width="100%" cellpadding="5"><tbody><tr><td bgcolor="#FFFFFF"><b>AAKER</b> <small>(<a href="http://google.com">Soundex A260</a>) — <i>See also</i> <a href="http://google.com">ACKER</a>, <a href="http://google.com">KEAR</a>, <a href="http://google.com">TAAKE</a>. </small> </td></tr></tbody></table><br clear="all"> <table align="left"

Storing information from td tags with a specific width, in python

时光总嘲笑我的痴心妄想 提交于 2021-01-28 10:24:15
问题 I am trying to store all the information from the td tags that have width="82" or maybe there is a more efficient method. <a name="AAKER"> </a> <table border="" width="100%" cellpadding="5"><tbody><tr><td bgcolor="#FFFFFF"><b>AAKER</b> <small>(<a href="http://google.com">Soundex A260</a>) — <i>See also</i> <a href="http://google.com">ACKER</a>, <a href="http://google.com">KEAR</a>, <a href="http://google.com">TAAKE</a>. </small> </td></tr></tbody></table><br clear="all"> <table align="left"

python xml iterating over elements takes a lot of memory

旧城冷巷雨未停 提交于 2021-01-28 10:14:42
问题 I have some very big XML files (around ~100-150 MB each). One element in my XML is M (for member), which is a child of HH (household) - i.e. - each household contains one or more members. What I need to do is to take all the members that satisfies some conditions (the conditions can change, and can be both on the household and on the members - e.g. - just members from households with high income (constraint on the household), who's age is between 18-49 (constraint on the member)) - and to

python xml iterating over elements takes a lot of memory

一笑奈何 提交于 2021-01-28 10:07:37
问题 I have some very big XML files (around ~100-150 MB each). One element in my XML is M (for member), which is a child of HH (household) - i.e. - each household contains one or more members. What I need to do is to take all the members that satisfies some conditions (the conditions can change, and can be both on the household and on the members - e.g. - just members from households with high income (constraint on the household), who's age is between 18-49 (constraint on the member)) - and to

python xml iterating over elements takes a lot of memory

一曲冷凌霜 提交于 2021-01-28 10:03:01
问题 I have some very big XML files (around ~100-150 MB each). One element in my XML is M (for member), which is a child of HH (household) - i.e. - each household contains one or more members. What I need to do is to take all the members that satisfies some conditions (the conditions can change, and can be both on the household and on the members - e.g. - just members from households with high income (constraint on the household), who's age is between 18-49 (constraint on the member)) - and to

XPATH Get child elements Typescript/Javascript

只愿长相守 提交于 2021-01-28 09:52:00
问题 I have this XML: <dl> <number>1</number> <ref>r54</ref> </dl> <dl> <number>2</number> <ref>r67</ref> </dl> <dl> <number>3</number> <ref>r89</ref> </dl> I need to store Dl in an array which contains all the child values of the dl. My output should be: dl: { number: 1, ref: r54 }, dl { number: 1, ref: r67 }, dl { number: 1, ref: r89 }, I'm trying to do something like this: public getArrayDl(xml: Document, xpath: string) { let array = []; let i = 0; let nodes = xml.evaluate(xpath, xml, null,

How to click on the radio button through the element ID attribute using Selenium and C#

倾然丶 夕夏残阳落幕 提交于 2021-01-28 09:50:14
问题 I am trying to select a radio button and input element, it has an id of group and value of In_Group . There are 4 different radio buttons with the same id but different values hence I am trying to select the correct one i am looking for. <input class="custom-radio" id="group" name="group" type="radio" value="In_Group"> I tried something like this: driver.FindElement(By.XPath("//*[contains(@id='group' and @value='In_Group')]")) But the element is not found could someone help me out 回答1: To

Click on check box after confirming text in html table which is dynamic

﹥>﹥吖頭↗ 提交于 2021-01-28 08:38:22
问题 I need to click on the check box in the HTML table after asserting the text. Below is the html. <div class="k-widget k-grid "> <div class="k-grid-header" style="padding: 0px 16px 0px 0px;"> <div class="k-grid-header-wrap"> <table> <colgroup> <col width="50px"> <col> <col> </colgroup> <thead> <tr> <th aria-sort="" colspan="1" rowspan="1" class="k-header checkbox-grid-column"><input id="c3c07f7e-5119-4a36-9f67-98fa4d21fa07" type="checkbox" class="k-checkbox"><label class="k-checkbox-label" for=