Author |
Topic |
 hatusemajic |
Posted - 2011.08.17 19:06:00 - [ 1]
Edited by: hatusemajic on 17/08/2011 19:57:58 Edited by: hatusemajic on 17/08/2011 19:10:03 all afternoon i've been trying to right a query to get the amount of ore i have in my assets and its not working. to do this i'm using google docs importXML function with the following parameters:http://api.eveonline.com/char/AssetList.xml.aspx?userid=0123456789&characterid=012345678&apikey=0123456789 and the Xpath: //row[@typeID=20]@quantity i know the url is correct and if i modify the XPATH to something simple it sometimes returns actual data from the query. however im having serious problems getting almost anything to work. Also as a note typeid="20", 20 is veld if you have had any success in the past please help me to figure out what im doing wrong
EDIT also i used a XPATH Tool to verify that it is correct: http://www.bit-101.com/xpath/
also //row[@typeID=20]/@quantity does not work as well |
 Lutz Major |
Posted - 2011.08.17 19:54:00 - [ 2]
I don't know if google doc support the sum function, but this is the XPATH to use: sum(//row[@typeID=20]/@quantity) |
 hatusemajic |
Posted - 2011.08.17 19:57:00 - [ 3]
Originally by: Lutz Major I don't know if google doc support the sum function, but this is the XPATH to use:
sum(//row[@typeID=20]/@quantity)
thanks for the reply but i'm confused how i would use that. do you mean like =importXML("api url",sum(//row[@typeID=20]/@quantity))? |
 Lutz Major |
Posted - 2011.08.17 20:54:00 - [ 4]
apparently the google docs xpath engine converts everthing to lower case. So your function must look like: =importXml("URL", "sum(//row[@typeid='20']/@quantity)") |
 hatusemajic |
Posted - 2011.08.17 20:56:00 - [ 5]
Originally by: Lutz Major apparently the google docs xpath engine converts everthing to lower case. So your function must look like:=importXml("URL", "sum(//row[@typeid='20']/@quantity)")
it works! it works! :D :D :D |
 Ells Re |
Posted - 2011.08.22 21:56:00 - [ 6]
I'm new to google docs, and my skills are poor.
Is there a way to set an argument to asses the location or the flag as well as the typeID?
for instance //row[@typeID='20']& //row[@flag='120']/@quantity
|