This project is read-only.

Guildpage update, parser error + update

Dec 10, 2007 at 2:34 AM
Heya
yep armory updated again and whenever i do a guild.name guild.realm it gives an error... why?
becouse they changed the Guild to Guildkey

i changed

Public Shared Function GetGuild(ByVal Realm As String, ByVal Name As String, ByVal Region As RegionEnum) As Guild
Dim g As New Guild
Dim path As String = GetRegionPath(Region) & "/guild-info.xml"
Using doc As XmlReader = GetStream(path, Realm, Name)

g.Region = Region
Do While doc.Read
If doc.NodeType = XmlNodeType.Element Then
If doc.LocalName = "guild" Then
g.BattleGroup = doc.GetAttribute("battleGroup")
g.Realm = doc.GetAttribute("realm")
g.Name = doc.GetAttribute("name")
End If

to

Public Shared Function GetGuild(ByVal Realm As String, ByVal Name As String, ByVal Region As RegionEnum) As Guild
Dim g As New Guild
Dim path As String = GetRegionPath(Region) & "/guild-info.xml"
Using doc As XmlReader = GetStream(path, Realm, Name)

g.Region = Region
Do While doc.Read
If doc.NodeType = XmlNodeType.Element Then
If doc.LocalName = "guildKey" Then
g.BattleGroup = doc.GetAttribute("battleGroup")
g.Realm = doc.GetAttribute("realm")
g.Name = doc.GetAttribute("name")
End If

note that it is guildkey now.
and it works perfectly now

not sure if it fixes it all but i hope it helps out atleast someone
Dec 11, 2007 at 12:09 PM
thank you for help! :D

at the moment i'm focused on university so i can't trace any blizzard's change in .xml files :D