Sign in to follow this  
Followers 0
rejectpenguin

XML Parse works for one file but not the other

2 posts in this topic

#1 ·  Posted (edited)

So the code works fine for http://www.wowarmory.com/guild-info.xml?r=Aegwynn&gn=Continuum but when I try it with http://www.wowarmory.com/guild-info.xml?r=Aegwynn&gn=Myst it doesn't work at all. I really have no clue what the problem can be and I have looked through the xml files and didn't notice anything.

#include <_XMLDomWrapper.au3>
#include <File.au3>

;http://www.wowarmory.com/guild-info.xml?r=Aegwynn&gn=Continuum
;http://www.wowarmory.com/guild-info.xml?r=Aegwynn&gn=Myst
Global $oXML = ObjCreate("Microsoft.XMLHTTP")
$oXML.Open("GET", "http://www.wowarmory.com/guild-info.xml?r=Aegwynn&gn=Myst", 0)
$oXML.Send

Global $sFile = _TempFile(@TempDir, '~', '.xml')
FileWrite($sFile, $oXML.responseText)

If _XMLFileOpen($sFile) Then
    Local $sLvl = _XMLGetAttrib('./guildInfo/guildHeader', 'members')
    ConsoleWrite($sLvl & @LF)
EndIf

FileDelete($sFile)
Edited by rejectpenguin

Share this post


Link to post
Share on other sites



Believe it or not the problem was ascii character codes.. Apparently some of the _XML functions won't work if there are any ascii codes in your file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0