42 Topics

Member Avatar for
Member Avatar for Rach!

i Am new to selenium webdriver and I want to automate a webpage related to my project. I am currently working on login page, however I facing problem with the login button which I am confused which locator to use. The login button is below: a href="javascript:LoginSubmit('Log In')"> img border="0" …

0
120
Member Avatar for Osagie_1

I have an xml structure : <Pages> <!--This is the root node--> <Home> <url>...</url> <menu> <item>Help</item> <item>About</item> <item>Contact</item> </menu> </Home> <Help> <url>...</url> <menu> <!--i need to select this if its parent(Help) is listed in Home/menu/item above--> <item>Business Help</item> <item>Web Help</item> <item>Tour Help</item> </menu> </Help> <About> <url>...</url> <menu> <!--And Or select …

0
128
Member Avatar for servent123

Hi there ! I have xml and xsl files i need to convert them to xslfo files . I need this to convert to pdf files. Thanks.

Member Avatar for servent123
0
372
Member Avatar for flebber

Hi What would be a good recommendation for a practical resources on using xml, xpath and xquery? By practical I mean. Accessing values, storing files, creating set queries on xml to create a feed to push data to other applications (eg ipython, rstudio, the Web) maintaining data integrity, and transformng …

Member Avatar for Mike Askew
0
345
Member Avatar for Osagie_1

I have an xml structure : <Articles> <Article ID="111"> <author>Peter Paul</author> <pubDate>01/01/2015</pubDate> <Translations> <lang1>English</lang1> <lang2>French</lang2> <lang3>Arab</lang3> <lang3>Chinese</lang3> </Translations> </Article> <Article ID="222"> <author>Monkey Rice</author> <pubDate>01/01/2016</pubDate> <Translations> <lang1>English</lang1> </Translations> </Article> <Article ID="333"> <author>John Silas</author> <pubDate>01/01/2017</pubDate> <Translations> <lang1>English</lang1> <lang2>French</lang2> <lang3>Arab</lang3> <lang3>Chinese</lang3> </Translations> </Article> </Articles> i created a method AddRecordByInfoMatch() that attempts to add …

0
134
Member Avatar for george08.08

Is it possible to count the instances of a for-each boolean statement. for example, say you have patients in a hospital and certain criteria must be met to discharge them. 100(%0) health would equal a discharge, pseudo code would read something like this: totalHealth - HighTemperature + medication * recoveryPeriod …

Member Avatar for george08.08
0
618
Member Avatar for adam123456789

I can't figure out two expressions in xpath. Can someone help ? Here they are substring-after(substring-before(//ul[@id='biblio']/li[3], ']', '[')) //h2[normalize-space(string())='name']/preceding::h1[1]

Member Avatar for xml_looser
0
239
Member Avatar for pooja_3

<?php $variable=$_POST['module']; $xmldoc = new DOMDocument(); $xmldoc->load('info.xml'); $xpathvar = new Domxpath($xmldoc); $queryResult = $xpathvar->query("testcase[substring-after( substring-after(script, '/'), '/' ) = '$variable' or substring-before( substring-after( substring-after(script, '/'), '/' ), '/' ) = '$variable']"); foreach($queryResult as $var) { echo $var->textContent; echo "\n"; } ?> I have written this code to fetch those content …

Member Avatar for pooja_3
0
204
Member Avatar for Mapper99

I have two similar nodes in an XML file. When using a CONTAINS query via XPATH, the XPATH query returns two sets of data. I would like it to only return the exact match. Any idea if this is possible? Here is my code: $uc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $lc = "abcdefghijklmnopqrstuvwxyz" …

Member Avatar for Mapper99
0
2K
Member Avatar for PriteshP23

I would like to get Type, Id and Height values in database table. It is not working. There is no error message. Objective is to get RESPECTIVE "Type" from Catalaog which has same Reference from Installed. Well, I have 850 Mb XML file and i just would like to present …

Member Avatar for PriteshP23
0
269
Member Avatar for PriteshP23

I would like to get **all** Equipment values. *I have used DOM Document.* It is reading **ONLY LAST Element**. *Equipment Id: 28*. I need all three. Thanks in advanced. XML File: <?xml version="1.0" encoding="UTF-8"?> -<Physical> <Catalog> </Catalog> -<Installed> -<Equipment> <Id>26</Id> <Ref>Tew12</Ref> -<Characteristic> <CharacteristicName>Height</CharacteristicName> <CharacteristicValue>160</CharacteristicValue> </Characteristic> -<Characteristic> <CharacteristicName>Tilt</CharacteristicName> <CharacteristicValue>30</CharacteristicValue> </Equipment> -<Equipment> …

Member Avatar for PriteshP23
0
591
Member Avatar for PriteshP23

I would like to get name of Tilt and its value 30. I am not able to get the value of Tilt. Let me know if you have any idea. Thanks in advanced. XML File: <?xml version="1.0" encoding="UTF-8"?> -<Physical> <Catalog> </Catalog> -<Installed> -<Equipment> <Id>26</Id> <Ref>Tew12</Ref> -<Characteristic> <CharacteristicName>Height</CharacteristicName> <CharacteristicValue>160</CharacteristicValue> </Characteristic> -<Characteristic> …

Member Avatar for PriteshP23
0
2K
Member Avatar for ROSS679

Hi, I am having a problem regarding the return statment, for some reason it is not working, can someone please tell me what i am doing wrong? The return is taking a selection of table collumns not all e.g. the simple return all "return $x" Thanks for $x in doc("Suppliers.xml")/dataroot/Suppliers[Country …

Member Avatar for FakeTales
0
352
Member Avatar for bs111

I am just learning Xpath. How to mix 2 or more xpath validtions into a single line. On my page, I have 2 different tables under hthe //body tag. I want to validate two td s that exist on these 2 different tables. IsElementPresent is my own method. It uses …

Member Avatar for bs111
0
222
Member Avatar for shahai.ali

how to get the data from the following `xml`: <HostipLookupResultSet version="1.0.1" xsi:noNamespaceSchemaLocation="http://www.hostip.info/api/hostip-1.0.1.xsd"> <gml:description>This is the Hostip Lookup Service</gml:description> <gml:name>hostip</gml:name> <gml:boundedBy> <gml:Null>inapplicable</gml:Null> </gml:boundedBy> <gml:featureMember> <Hostip> <ip>182.0.0.1</ip> <gml:name>Private</gml:name> <countryName>Private</countryName> <countryAbbrev>PR</countryAbbrev> <!-- Co-ordinates are available as lng,lat --> <ipLocation> <gml:pointProperty><gml:Point srsName="http://www.abc.net/xyz/srs/epsg.xml#4326"> <gml:coordinates>68.7833,30.4</gml:coordinates> </gml:Point></gml:pointProperty> </ipLocation> </Hostip> </gml:featureMember> </HostipLookupResultSet> following is what i was trying: …

Member Avatar for diafol
0
255
Member Avatar for shahai.ali

hi to all m lil bit confuse as m beginner to the xml+xpath. so m sorry if i m unable to ask any kind of wrong question. now the question is m trying to accessing the name of the of the attribute of xml file using xpath and tyring to …

Member Avatar for shahai.ali
0
162
Member Avatar for suresh.xsltlist

Hi, Can someone help me on this. Really appreciated. **Requirement:** 1. To generate separate html files for each pal:fragment element, for the source document attached ,the files gets name based on @fragment-id which is present on the pal:fragment elements. 2. The <pal:fragment> can be nested, wrapped with<div> element. 3. The …

0
164
Member Avatar for Ronene

Hello , I'm trying to solve a "known problem" in XPath 1.0 . From [msdn](http://msdn.microsoft.com/en-us/library/bb341675.aspx) : "***Although the ordering of returned collections is not specified in the XML XPath Language 1.0 Recommendation, this extension method returns nodes in document order. Note that nodes are returned in document order even when …

0
120
Member Avatar for dr3ex

Hi, I have problem with evaluating XPath with query. When I use this in xpath_tester script: [B]URL: [url]http://www.seznam.cz[/url][/B] [B]XPath: //*[@id='gadget-6']/div/div/h3/span[1][/B] Works fine, but this: [B]URL: [url]http://www.seznam.cz[/url][/B] [B]XPath: //*[@id='gadget-1']/div/div/div/div/table/tbody/tr[1]/td/div/div/strong/a[/B] Result: "ERROR 2: No result!", because there are no items in $nodeList I'm 100% sure XPath is OK. (using XPath checker extension …

0
124
Member Avatar for ttback

This thread is related to my thread on Java's forum: [url]http://www.daniweb.com/software-development/java/threads/408377[/url] I don't mean to make multiple posts but I wasn't sure which of these forums this problem belongs to. I will focus on asking about the XPath part here. I have a problem to understand XPath when it comes …

0
92
Member Avatar for ttback

I spent about 4 hours trying to make PMD being able to validate my Java code but XPath proved to be very painful to work with when developing fairly original custom rules. My rule requires me to apply them only to methods without 'get' as part of their name. In …

0
288
Member Avatar for tungsten

Hello everyone, I am studying XML, XPath, XQuery, XSLT on my own and I want to sharpen my skills working on opensource projects. I am searching on Apache and other websites but the projects are too huge and in much advanced stage to start working on. I want to get …

Member Avatar for dknochen
0
223
Member Avatar for iswariak

1. I want to take unique district values from the below xml. How to do it in XPATH? 2. I want to take unique taluk values and district name="xyz". what is the xpath expression? XML structure: <?xml version="1.0" encoding="utf-8"?> <imageData> <row> <slno>1</slno> <sitecode>001</sitecode> <sitename>Mel Sittamur</sitename> <photono>001_001_001.jpg</photono> <photodate>07-09-2008</photodate> <district>Villupuram</district> <taluk>Senji</taluk> <monument><![CDATA[Jain …

Member Avatar for zaibi403
0
4K
Member Avatar for spelltox

Hi guys ! A little something i hope you could help me with - I've converted an html to XML and now i want to get all the child nodes nested within a DIV element with a specific attribute (class="itemInfo"). Because the html that the XML is based on changes …

Member Avatar for spelltox
0
476
Member Avatar for spelltox

Hello to all ! Sorry in advance for the long post. I'm trying to get the value of a specific <div> from an html. This div has a class attribute of "itemPrice6", but problem is that this class appears few more times for other <div>s in which i'm not interested …

0
103
Member Avatar for technopup

Hello, I have a PHP file that lists a Post Code variable ($thisPostcode). Using simpleXML I need to compare the value of the Post Code variable to the Post Code attribute in an xml document, if there is a match I need it to echo the statement below if not …

0
99
Member Avatar for uid1

I have the following XPath expression written in Java: [CODE] " pProbs = XPath.newInstance(/n-grams-sorted/n-gram[contains(.,"+content1+") or contains(.,"+content2+") or contains(.,"+content3+") or contains(.,"+content4+") or contains(.,"+content5+")]/@probability"); [/CODE] My problem is that not all of the contains() expressions return true. What I need is: If one of them returns 'false' (i.e.: there are no nodes …

Member Avatar for uid1
0
211
Member Avatar for uid1

I am trying to run this XPath expression (that is, trying to count how many element content strings in my XML file end with letter-one-f ('a') or letter-two-f ('A'): [code=xslt]<xsl:value-of select="count( substring(.,string-length(.) -1,string-length(.) -1)=$letter-one-f or substring(., string-length(.) -1,string-length(.) -1)=$letter-two-f )"/>[/code] but I don't know how to refer to the 'current …

Member Avatar for uid1
0
248
Member Avatar for zigpy_siva

Hi, we are using the XML Template of MS Word, and trying to use XPath(in a tool not code, but the same is not working in code also) to read the data from the xml file. attached the sample code, xml file and the XSD used to generate the word …

0
102
Member Avatar for desbest

[B]How do I get the value of a node with XPath?[/B] Get all nodes which have a price above 35 [COLOR="Green"]/bookstore/book[price>35.00][/COLOR] But when I change the > to an = for equals, the query fails. Please help. By the way I'm using php, but that shouldn't matter as XPath is …

Member Avatar for pritaeas
0
169

The End.