xpath

How to use multiple xpath datasets on XML datasource using PHP Jasper?

落花浮王杯 提交于 2020-07-08 00:36:44
问题 I have designed a report in Jasper Studio that use XML as datasource and two XPATH datasets. I am able to generate the report and the data is filled from the first dataset (/data/invoice), but the second dataset (/data/invoice_items/row) is not found and returns null. How can I add a second xpath to the php script for 'xml_xpath' => '/data/invoice_items/row' This is my XML data: <?xml version="1.0" encoding="utf-8"?> <data> <invoice> <ID_Invoice>54654</ID_Invoice> <Invoice_Code>FCS</Invoice

How to use multiple xpath datasets on XML datasource using PHP Jasper?

不羁的心 提交于 2020-07-08 00:34:43
问题 I have designed a report in Jasper Studio that use XML as datasource and two XPATH datasets. I am able to generate the report and the data is filled from the first dataset (/data/invoice), but the second dataset (/data/invoice_items/row) is not found and returns null. How can I add a second xpath to the php script for 'xml_xpath' => '/data/invoice_items/row' This is my XML data: <?xml version="1.0" encoding="utf-8"?> <data> <invoice> <ID_Invoice>54654</ID_Invoice> <Invoice_Code>FCS</Invoice

How to use multiple xpath datasets on XML datasource using PHP Jasper?

醉酒当歌 提交于 2020-07-08 00:32:11
问题 I have designed a report in Jasper Studio that use XML as datasource and two XPATH datasets. I am able to generate the report and the data is filled from the first dataset (/data/invoice), but the second dataset (/data/invoice_items/row) is not found and returns null. How can I add a second xpath to the php script for 'xml_xpath' => '/data/invoice_items/row' This is my XML data: <?xml version="1.0" encoding="utf-8"?> <data> <invoice> <ID_Invoice>54654</ID_Invoice> <Invoice_Code>FCS</Invoice

How to use multiple xpath datasets on XML datasource using PHP Jasper?

人走茶凉 提交于 2020-07-08 00:31:23
问题 I have designed a report in Jasper Studio that use XML as datasource and two XPATH datasets. I am able to generate the report and the data is filled from the first dataset (/data/invoice), but the second dataset (/data/invoice_items/row) is not found and returns null. How can I add a second xpath to the php script for 'xml_xpath' => '/data/invoice_items/row' This is my XML data: <?xml version="1.0" encoding="utf-8"?> <data> <invoice> <ID_Invoice>54654</ID_Invoice> <Invoice_Code>FCS</Invoice

XPath evaluation in VBA (Excel)

情到浓时终转凉″ 提交于 2020-07-06 13:04:39
问题 I have an xml file to be evaluated in Excel 2010. The xml file looks as follows: <Account> <Entry> <Value>5</Value> </Entry> <Entry> <Value>4</Value> </Entry> <Entry> <Value>-3.6</Value> </Entry> </Account> I want to sum over all values of every 'Entry' that fits some specified conditions. The evaluation which I need looks as follows: sum(/*/Entry[Date[starts-with(., '04') and contains(., '2014')]][Value < 0.0][not(ContraEntryID)]/Value) I don't know how to get this evaluated in Excel. What I

xml filtering with python

本秂侑毒 提交于 2020-07-05 09:16:08
问题 I have a following xml document: <node0> <node1> <node2 a1="x1"> ... </node2> <node2 a1="x2"> ... </node2> <node2 a1="x1"> ... </node2> </node1> </node0> I want to filter out node2 when a1="x2" . The user provides the xpath and attribute values that need to tested and filtered out. I looked at some solutions in python like BeautifulSoup but they are too complicated and dont preserve the case of text. I want to keep the document same as before with some stuff filtered out. Can you recommend a

Convert string in scientific notation to number format in XPath

耗尽温柔 提交于 2020-07-05 03:55:52
问题 I have this String: 8.1161E-002 This string is actually a result of a calculation (unfortunately the result is converted to string and I can't change it). So how could I convert this String to a format like 00.081 ? I'm looking at XPath reference but I can't find a format() function for example. Is there a way of doing this in XPath? 回答1: XPath 1.0 solution If you are stuck with XPath 1.0 and your input is of the form ( mantissa E+ exponent ) or ( mantissa E- exponent ) you can use this hack

Google Sheet use Importxml error could not fetch url

落花浮王杯 提交于 2020-07-03 05:05:11
问题 I want to get price data on this website (https://tarkov-market.com/item/Pack_of_sugar) But it doesn't work =IMPORTXML("https://tarkov-market.com/item/Pack_of_sugar","//*[@id='__layout']/div/div[1]/div/div[4]/div[1]/div[2]/div[1]/div[2]") 回答1: You want to retrieve the price like 55,500₽ from the URL of https://tarkov-market.com/item/Pack_of_sugar and put to a cell on Google Spreadsheet. I could understand like this. If my understanding is correct, how about this answer? Issue and workaround:

Python and Selenium xpath for selecting with multiple conditions

社会主义新天地 提交于 2020-07-03 02:42:10
问题 I have the following code in selenium but continue to get a syntax error. I'm trying to select an element based on multiple conditions. choices = driver.find_elements_by_xpath("//div[contains(.,'5') and [contains(@class, 'option')]]")$ Thanks for any help you can give. 回答1: As per the xpath you have shared as follows : choices = driver.find_elements_by_xpath("//div[contains(.,'5') and [contains(@class, 'option')]]")$ You need to consider a few facts : The multiple conditions for selecting the

Excel - Extract substring(s) from string using FILTERXML

醉酒当歌 提交于 2020-06-30 04:38:55
问题 Background Lately I've been trying to get more familiar with the concept of changing a delimited string into an XML to parse with Excel's FILTERXML and retrieve those substrings that are of interest. Please note that this function came available from Excel 2013 and is not available on Excel for Mac nor Excel Online. With a delimited string, I meant anything from a normal sentence using spaces as delimiters or any other combination of characters that could be used to define substrings within a