How to find the xpath for this? - xpath

For below code:
Edit Details
I am arriving this xpath: ("//a[#href='profile?action=edit'")
it says invalid xpath.
Can any one let me know pls?
Thanks

This should work:
//a[#href='profile?action=edit']

Related

what does alloc_calls and free_calls mean?

Can anyone tell me what the output of the following implies,
/sys/kernel/slab/kmalloc-128/alloc_calls
/sys/kernel/slab/kmalloc-128/free_calls
Thanks in advance

Response selector -- using variables

My scrapy script returns results when xpaths are hard coded but does not work with variables. What am I missing
The following works:
response.selector.xpath('//*[(#id = "abc")]').extract()
The following DOES NOT works:
response.xpath("{}".format(xpath_variable)).extract()
Can someone please tell me what I'm doing wrong. Thanks!
Just figured this out. There was a mistake with my code since I was replacing text within the xpath. Variables do in fact work. Thanks for looking into this Tomas!

Simplifying an xPath query

Simplify the following xPath so that it is as small as possible but still identifies the element in question
/html/body/div[#id='vwd4_page']/div[#id='vwd4_content']/div[#id='Layout']/div[#id='FooterAction']/div[3]/form[#id='searchform']/span/input[#id='searchfield']
Can you use this?
//input[#id='searchfield']

HTMLAgilityPack xpath

I have hit a wall with this one, please could someone help me out?
From the URL below I am looking to get to the inner text of
A2A
The XPath syntax I am using doesn't return any data:
.//table[#class='table_dati']//tbody[#class='constituents']//tr//td[#class='name']//a
The URL is
http://www.borsaitaliana.it/borsa/azioni/ftse-mib/lista.html?lang=en&page=1
Thanks in advance,
Grant
How about //tbody[#class='constituents']//td[#class='name']/a? This should work pretty well, actually.
Your XPath starts with ., so it is relative to the context node. But you haven't told us anything about the context. Maybe you want to omit the initial . and make it "absolute":
//table[#class='table_dati']/tbody[#class='constituents']/tr/td[#class='name']/a
I would also change the // to / wherever you're looking for a direct child (not descendant in general) relationship.
From my experience, HTMLAgilityPack doesn't play nice with the tbody tag. I just follow up the table with the tr td to find the right cell, skipping tbody altogether.

Need Information on XslCompiledTransform in Plain English

Does anybody have any links that explain proper implementation of the XSLCompiledTransform? Thanks
http://msdn.microsoft.com/en-us/library/system.xml.xsl.xslcompiledtransform.aspx

Resources