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.
 

Capital letters in Xpath

First post
Author
Nalha Saldana
Aliastra
Gallente Federation
#1 - 2014-10-15 17:14:19 UTC
I'm trying to fetch info from https://api.eveonline.com/eve/CharacterInfo.xml.aspx for a google docs sheet but it doesn't work where the Xpath name includes a capital letter.

For example i can fetch "//corporation" fine but if i try to get anything like "//shipTypeID" that has capital letters in the name it simply doesnt work.

In a few cases they work when i make them small letters instead like this "//shiptypeid".

Is there any way around this problem?
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2014-10-16 15:25:28 UTC
Google doesn't do xpath correctly. It lowercases all node and attribute names.


Unfortunately, the only way round it is to lowercase all your xpath.

(or, if it's viable, write a function in googledocs script to handle your lookup for you. https://github.com/fuzzysteve/eve-googledocs-script has some examples)

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Nalha Saldana
Aliastra
Gallente Federation
#3 - 2014-10-16 16:00:00 UTC
solved the problem now, apparently had a ? too much in the adress, doesnt explain why i could import the all lowercase ones but it works!
Nalha Saldana
Aliastra
Gallente Federation
#4 - 2014-10-16 16:58:46 UTC
while i have this thread up maybe someone can help me, i want to grab "level" where there is a specific typeid, how do i write that?
row typeID="3551" skillpoints="8000" level="3"
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#5 - 2014-10-16 18:01:08 UTC
My first suggestion would be:

Grab one of the functions from my github, modify it (Have a go yourself, but if you can't get it working, drop me a mail) , and just load /all/ the skills at once. Keep them in a seperate sheet, and just vlookup whenever you need one.

Other than that, something like

//row[@typeid=3551]/@level

I think.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter