Go Back   EN World D&D / RPG News

View Single Post
Old 30th June 2009, 10:14 PM   #35 (permalink)
catsclaw227
Optimism; it feels better
 
catsclaw227's Avatar
 
Join Date: Sep 2003
Location: Cary, NC
Posts: 3,333
catsclaw227 Hobgoblin Soldier (Lvl 3)
Send a message via Yahoo to catsclaw227
Yea, I ended up doing that too.

Also, playing around with the API without creating a webreference to the DDI service, I also used a simple approach and just loaded the url into an XDocument. Then I can easily traverse the monsterlist with Linq to Xml.

Code:
    XDocument monsterXml = GetSearchResults("http://www.wizards.com/dndinsider/compendium/CompendiumSearch.asmx/KeywordSearch?Keywords=Human+Guard&tab=Monster")


    public XDocument GetSearchResults(string url)
    {
        XDocument resultsXml = new XDocument();
        try
        {
            resultsXml = XDocument.Load(url);
        }
        catch (Exception e)
        {
            throw e;
        }
        return resultsXml;
    }
__________________
Game on, gang!
Ptolus #16 (with customized, personalized sig from Monte. Awesomesauce.), Rappan Athuk Reloaded #37 (Another Awesomesauce, the Necromancer way.)

Try to not let failure to use technical language properly get in the way of getting to the real point under discussion. - Umbran

Characters & Games

Books currently in play: Dungeon & Dragon Magazine (*Scales of War AP*), WOTC 4e Core and Supplemental books

Current Campaign: Scales of War - Lost Mines of Karak -- Kodirgo, Minotaur Barbarian 6; Vondal, Dwarf Cleric 6; Karithul, Gnome Bard 6; Marshaun, Elf Druid 6

Last edited by catsclaw227; 30th June 2009 at 10:18 PM..
catsclaw227 is offline   Reply With Quote
 

And yet another word from our sponsors
Visit Our Sponsors
Visit Our Sponsors... Again
Powered by vBadvanced CMPS v3.0.1

All times are GMT +1. The time now is 08:43 AM.


Site Contents © 2008 ENWorld
PHP Ajax Multimedia Web Framework © 2008 Digital Media Graphix
Powered by vBulletin® Version 3.8.0 Beta 1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

"Vault Data" powered by VaultWiki v2.5.1.
Copyright © 2008 - 2009, Cracked Egg Studios.