Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 2 post(s) |
Tony Sunz
Imperial Academy Amarr Empire
0
|
Posted - 2014.09.12 05:37:00 -
[1] - Quote
Hello, I've been going over it a few hours now and I can't seem to find the answer that I'm looking for. Here goes...
For example the XML call is for the "Crucifier" at: https://www.fuzzwork.co.uk/blueprint/api/xml.php?typeid=2161
I am using this in order to get blueprint materials into a spreadsheet. I have used the "WEBSERVICE" fxn to get excel to see the xml, no problem. But I cannot figure out how to select the quantity for a specific type of material.
"/eveapi/activity[@activity='1']/materials/material/quantity" This produced the result for Tritanium, but it is far too general of a query to return other materials so...
What would be the proper xpath for say Pyerite? Maybe a close variation of...
/eveapi/activity[@activity='1']/materials/material[/name=Pyerite]/quantity
I know that I need to select the correct division of "material" based off an attribute(?) of typeid or name, then return the "quantity" but haven't been able to stumble upon the answer. Thank you for the help.
Sunz |
Steve Ronuken
Fuzzwork Enterprises Vote Steve Ronuken for CSM
3830
|
Posted - 2014.09.12 10:18:00 -
[2] - Quote
I recommend getting the condensed version of all materials, rather than pulling each individually. That way, you can run it through a split function, and be entirely sure the data is coming back correctly. Woo! CSM 9! http://fuzzwork.enterprises/ Twitter: @fuzzysteve on Twitter |
Tony Sunz
Imperial Academy Amarr Empire
0
|
Posted - 2014.09.12 15:13:00 -
[3] - Quote
Thanks for the reply Steve. I believe my question is the same still.
What is the proper XPATH to pick the correct condensed version of the materials I want? Like for Pyerite in the above example.
Thanks for the help. |
Steve Ronuken
Fuzzwork Enterprises Vote Steve Ronuken for CSM
3831
|
Posted - 2014.09.12 16:06:00 -
[4] - Quote
Actually, I was suggesting pulling all of them. Then using a vlookup to pull the appropriate data :) More efficient. Woo! CSM 9! http://fuzzwork.enterprises/ Twitter: @fuzzysteve on Twitter |
|
ISD Decoy
ISD Community Communications Liaisons
185
|
Posted - 2014.09.12 20:17:00 -
[5] - Quote
Moved to Technology Lab. ISD Decoy Lieutenant Community Communication Liaisons (CCLs) Interstellar Services Department |
|
Nosferatu Zodd
Behelith
0
|
Posted - 2014.09.18 23:15:00 -
[6] - Quote
For Pyerite it would be : /eveapi/activity[@activity='1']/materials/material/quantity[//typeid=35]
If you want to be sure that it looks in the correct activity ID : /eveapi/activity[@activity='1']/materials/material/quantity[/eveapi/activity[@activity='1']/materials/material/typeid=35]
If the structure of the XML doc would be like below (trunkated example) the XPATH expression would be easier. But the structure is like this because it's also like this in the static data dump. Steve Ronuken would need to convert the XML output for use with excel, then again it might be more troublesome for say filemaker.
[material typeID="34"] _[name] Tritanium [/name] _[quantity] 13333 [/quantity] [material] [/quote]
XPATH : /eveapi/activity[@activity='1']/materials/material[@typeID=35]/quantity
P.s.: sorry no html allowed |
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |