These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Proper Xpath method

Author
Miss Negotiatrix
Science and Trade Institute
Caldari State
#1 - 2015-08-10 09:28:21 UTC
So I'm trying to make a simple api call that will show a characters ID number... I will expand on it later but for now I'm just playing around trying to figure out how everything works...

I'm able to get the first characters name id, anything really on my account, but I cant figure out how to use xpath to filter down to the part I want

for instance, I can do

"/eveapi/result//row/@characterID") and that shows me the first characters ID but how would I go about filtering it to the character ID for a given name

I tried a lot of variations that I saw on some xpath tutorial sites but I just cant seem to get it

what I want is something like this "/eveapi/result//row/[@name='XXXXX']//row/@characterID")

I know thats not the right way since it wont work but can anyone show me the proper way so I can start on the right track while I'm learning everything?


Thanks!

:)
Miss Negotiatrix
Science and Trade Institute
Caldari State
#2 - 2015-08-10 09:36:58 UTC
I know there are other ways to get an ID, I'm just using this as an example to learn on so I can learn how to filter down the results from the API
Miss Negotiatrix
Science and Trade Institute
Caldari State
#3 - 2015-08-10 09:54:59 UTC
ah nevermind, I found it


"/eveapi/result//row[@name='XXXXX']/@characterID"


I just had a / where I Shouldn't of

thanks :)