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.
 

Question about XML paths

First post
Author
Nina Lowel
Echelon Research
Goonswarm Federation
#1 - 2016-04-13 16:38:38 UTC  |  Edited by: Nina Lowel
Hello,

Im importing information into google docs

Is there a way to import and entire xml sheet at once?

Im not sure if I am explaining this correct so here is an attempt to show you what I mean

=IMPORTXML("https://api.eveonline.com/account/characters.xml.aspx?keyID=[idkey]&vCode=[vcode]","//row/@name")


What I am trying to do is have all of the "columns" imported at once instead of having to put a new url in each cell. The full list of columns is name,characterID,corporationName,corporationID,allianceID,allianceName,factionID,factionName

I am doing this simply to cut down on the number of requests to the servers - i can set up individual imports for each one but im not sure how to make it so I can just use a function in 1 cell to import everything in their own columns
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2016-04-14 11:49:35 UTC
not with import xml

It's because it's all in attributes, rather than in elements. google's importxml is a little limiting that way

If you want to do it, you'll need to write something to handle it yourself.

https://github.com/fuzzysteve/eve-googledocs-script has some scripts which do things with the api, so you may be able to use them as inspiration.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Zad Murrard
Frozen Dawn Inc
Frozen Dawn Alliance
#3 - 2016-04-15 09:15:12 UTC
Haven't tried, but http://www.w3schools.com/xsl/xpath_syntax.asp claims

@* Matches any attribute node

Reading from that one could understand that "//row/@*" would do the trick.

Not xpath expert so I don't know if I'm reading the page correctly or if it is like that whether google supports it.
Zad Murrard
Frozen Dawn Inc
Frozen Dawn Alliance
#4 - 2016-04-22 07:58:17 UTC
Did some testing, it seems indeed that gdocs supports "//row/@*" in xpath syntax. It seems to take them in order from last to first.