xpath: //tag[@attr] vs. //tag[attr]
Xpath question: When to use @ with an attribute and when not to. Does it matter? What is the difference ...
Xpath question: When to use @ with an attribute and when not to. Does it matter? What is the difference ...
Hi, I'm making a tool to create some xml files signed, and I need to use an XPath so my sign doesn't sign itself : <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"> <ds:XPath>not(ancestor-or-self::ds:Signature)</ds:XPath> </ds:Transform> <ds:Transform Algorithm="http://www.w3....
I have the following line that works for Firefox assertTrue(!selenium.isElementPresent("//input[@name=\""+chosen.getField().getName()+"\" and contains(@style, \"color: rgb(255, 0, 0);\")]")); But Fails in IE. When i inspect the field in IE, i see the color style represented in hexadecimal. How would you represent the line above to w...
I'm using selenium RC and I would like, for example, to get all the links elements with attribute href that match: http://[^/]*\d+com I would like to use: sel.get_attribute( '//a[regx:match(@href, "http://[^/]*\d+.com")]/@name' ) which would return a list of the name attribute of all the links that match the regex. (or something li...
Do any VBA libraries exist which will allow me to use XPath 2.0 within VBA? MSXML6 does not work with XPath 2.0. Basically, I want to parse XML documents using XPath 2.0 as it allows me to use functions within the XPath expression to filter the XML document. As an example, the usage of the function current-date() would be useful as I w...
Can anyone please suggest an XPath expression format that returns a string value containing the concatenated values of certain qualifying child nodes of an element, but ignoring others: <div> This text node should be returned. <em>And the value of this element.</em> And this. <p>But this paragraph element should be ignor...
Is it possible for Selenium to evaluate all the elements that may match a certain XPath? For instance, I'd like to evaluate whether all checkboxes are checked with //input[type='checkbox']--problem is I only get one element returned. ...
Hi. I am trying to find an element in an XML document in Delphi. I have this code, but it always says 0 elements in the log: function TForm1.KannaSidu: Boolean; var Doc: IXMLDOMDocument; List: IXMLDomNodeList; begin try Doc := CreateOleObject('Microsoft.XMLDOM') as IXMLDomDocument; Doc.async:=False; Doc.load(Filename)...
I am planning to use XPath to query an XML file. Can you please point me to a link which states the advantages of using XPath? Will the use of XPath improve performance? I am using .NET Framework 2.0. At present I am iterating through the node. XmlReaderSettings settings = new XmlReaderSettings(); settings.IgnoreWhitespace = true; XmlR...
<module> <component> <section> <ptemplateId root="1.8"/> <entry> <observation> <templateId root="1.24"/> </observation> </entry> </section> </component> <component> <section> <ptemplateId root="1.10"/> <entry> <observation> <templateId root="1.24"/> </observation> ...
Just want to know how to read an attribute of a parent node from a child node in XSLT. code: <A> <b attr1="xx"> <c> </c> </b> </A> XSLT: <xsl:template match="c"> <xsl:value-of select="attribute of b node"> </xsl:template> ...
I'm using selenium RC and want to get all the attributes and all. Something like: link = sel.get_full_link('//a[@id="specific-link"]') and the result would of: print link would be: <a id="specific-link" name="links-name" href="url"> text </a> Is this possible? thanks ...
I want to retrieve the xpath of the currently selected text in a browser. Using JavaScript I am able to get the selected text, but was not able to get the xpath. I can find the xpath manually using Firebug, but I want to do it programatically. Is it possible to do it? [EDIT] Okay, found a pointer to the solution in this thread. Modifie...
I'm trying to extract text from an xml node using Erlang's xmerl_xpath: [include "xmerl.hrl"] {Doc, _}=xmerl_scan:string("<node>Hello World</node>"). [#xmlText{value=Text}]=xmerl_xpath:string("//node/text()", Doc). Text. "Hello World" Works fine for this simple example. Problem occurs when the text in the node element is very larg...
I am trying to write a program in java where in i can find all the xpath for the given xml.I found out the link on the internet xpath generator but it does not work when one element can repeat multipletimes for example if we have xml like the following :- <?xml version="1.0" encoding="UTF-8"?> <Report> <Name> <FirstName>A</Firs...
I have written xslt scripts header & footers for blank pages, it is just a copy of the normal header and footer templates for other pages. The script is working for other pages, but its not working for blank pages..? Could anyone suggest me something? Here is my code: <xsl:template name="insertBodyBlankOddHeader"> <fo:static-conte...
I'd like something similar to Gerry Shaw's regex tool, ... but for XPath. I'd prefer a standalone tool, free, built on .NET, WinForms or WPF. EDIT: I found this one on codeplex, which fits my requirements as stated, but it's sort of feature-free. It doesn't even resize. ...
I have an XML document, want to do syntax highlighting. The code uses XPathDocument, XPathNavigator and XPathNodeIterator . After I call Select(), how can I get the original text in the XML document? var xpathDoc = new XPathDocument(new StringReader(this.richTextBox1.Text)); var nav = xpathDoc.CreateNavigator(); XmlNamespaceManager...
I've looked all over but I can't find any leads. Is it possible to do something like: //textarea/<some kind of function?> or <function>(//textarea) I know I can do this using JS, or any number of other techniques, but I'm asking because I'm using WebDriver and Firefox to test a TinyMCE textarea input, and because of JS execution de...
I am a C# programmer, so I don't get to take advantage of the cool XML syntax in VB. Dim itemList1 = From item In rss.<rss>.<channel>.<item> _ Where item.<description>.Value.Contains("LINQ") Or _ item.<title>.Value.Contains("LINQ") Using C#, I find XPath to be easier to think about, easier to code...