I'm trying to use Google spreadsheet to return the @name
attribute from a <row>
element when @characterID
has a certain value.
Google spreadsheet gives an "import internal error" when trying to use the following:
=IMPORTXML(CONCATENATE("http://api.eveonline.com/account/Characters.xml.aspx?keyID=",Summary!$B$10,"&vCode=",Summary!$B$11),"//eveapi/result/rowset/row[contains(@characterID,'94492798')]/@name")
The concatenate function provides a valid URL and http://www.freeformatter.com/xpath-tester.html gives me exactly what I want when I use
/eveapi/result/rowset/row[contains(@characterID,'94492798')]/@name
Any variations fail to work, too. eg //row[@characterID='94492798']/@name
Any ideas how I can get this to work?
Edit: FYI, it doesn't seem to like the predicate. Without the predicate, it returns all 3 rows with the @name attribute which is expected, but not what I'm looking to achieve.
Edit: At dirkk's recommendation, here's the relevant XML:
<?xml version='1.0' encoding='UTF-8'?>
<eveapi version="2">
<currentTime>2014-04-23 16:33:25</currentTime>
<result>
<rowset name="characters" key="characterID" columns="name,characterID,corporationName,corporationID,allianceID,allianceName,factionID,factionName">
<row name="Tor Norman" characterID="94488288" corporationName="Brave Newbies Inc." corporationID="98169165" allianceID="99003214" allianceName="Brave Collective" factionID="0" factionName="" />
<row name="Tor Dodi" characterID="94492798" corporationName="University of Caille" corporationID="1000115" allianceID="0" allianceName="" factionID="0" factionName="" />
<row name="Tor Jita" characterID="94506820" corporationName="School of Applied Knowledge" corporationID="1000044" allianceID="0" allianceName="" factionID="0" factionName="" />
</rowset>
</result>
<cachedUntil>2014-04-23 17:28:22</cachedUntil>
</eveapi>