Accessing the Camelot Herald via XML

Scott Jennings describes how to use XML to access Camelot Herald information: We've begun providing much of the data carried by the Camelot Herald, including server status and realm war data, via XML. If the thought of DTDs and data elements make you giddy, check out how to access this information and incorporate it into your own site. NOTE: not for the novice! Here's some basic information on how to access data published by the Camelot Herald for your own use, such as for publication on your guild's website or a Dark Age of Camelot news site. The Camelot Herald publishes data for the use of external web sites via XML. The XML we publish is very basic, using a strict XML 1.0 specification, and should be usable by any XML-compliant web platform. To that end, rather than "well-formed" XML or the Microsoft schema, our XML pages use a DTD, called "mythic.dtd" available here. Currently published information includes: SERVERS.XML http://www.camelotherald.com/xml/servers.xml If you are viewing this page using Internet Explorer 5.0 or higher, you should be able to follow the above link and view its XML code. This page is updated constantly and provides the following data: Server name Server type Current user count Whether or not the server is up Ownership of all relics on the server Ownership of all keeps on the server The data format, like all XML, should be fairly self-explanatory. The "realm" attribute for relics and keeps denotes the original owner of the relic or keep. The "owner" element denotes who currently owns the relic/keep. Now that you have this information, the next question naturally is what will you do with it. If you don't already have an XML publishing system for your web site, there are a number of options. If you are running IIS on a Windows NT web server, this article on 15 Seconds is a good quick introduction to using the XML document object model with ASP. You may have to first download the XML document locally before parsing it with your web page using this method, so it isn't the most efficient method of importing data. Microsoft is making XML a core part of its Web Services initiative with Windows XP and .NET, so there's a great deal of information available on MSDN, most of which assumes you are using .NET and Windows XP. If you are running Apache on either Unix or Windows NT, chances are good that you are using PHP for serving dynamic pages. (A quick glance at the URL in your browser should tell you how we feel about PHP.) PHP can optionally be installed with core XML support using the expat parser. If your server is so configured, there is an excellent tutorial at SitePoint on how to use PHP to import XML data. If your server's PHP module is not compiled with the XML library, you can use the php.XPath classes to provide basic XML functionality. We plan to provide as much information to the DAoC community as possible via XML; hopefully it proves useful to you. Important Note: These instructions are designed for the use of experienced web programmers and are not intended for novice designers. Mythic Entertainment CANNOT provide you with help or support on understanding or implementing anything described on this page for your own web site!

Comments

Free account required to post

You must log in or create an account to post messages.