このリンクから次のxml結果が得られます-https://api.eveonline.com/eve/CharacterID.xml.aspx?names= BorisKarlov
<eveapi version="2">
<currentTime>2013-01-16 18:57:38</currentTime>
<result>
<rowset name="characters" key="characterID" columns="name,characterID">
<row name="BorisKarlov" characterID="315363291"/>
</rowset>
</result>
<cachedUntil>2013-02-16 18:57:38</cachedUntil>
</eveapi>
そして、私はcharacterIDをaspに抽出しようとしています。私は次のコードを使用しています、
Set oXML = Server.CreateObject("Msxml2.DOMDocument.6.0")
oXML.LoadXML("https://api.eveonline.com/eve/CharacterID.xml.aspx?names=BorisKarlov")
Set oRoot = oXML.selectSingleNode("//result")
For Each oNode In oRoot.childNodes
response.Write oNode.Attributes.getNamedItem("characterID").Text
Next
Set oXML = Nothing
私が取得し続けるのは、次のエラーだけです。
MicrosoftVBScriptランタイムエラー「800a01a8」
必要なオブジェクト:'oRoot'
............。
Set oRoot = oXML.selectSingleNode( "// result")は実際にはデータを生成していないため、次の行でエラーが発生していると推測できます。
誰かが私の問題に光を当ててくれませんか?