WoW:Setting up Visual Studio for WoW XML: Difference between revisions

no edit summary
mNo edit summary
No edit summary
Line 13: Line 13:
== Visual Studio ==
== Visual Studio ==


Chances are, you don't just have a copy of Visual Studio hanging around for your coding pleasure. Thankfully, Microsoft has released parts of VS for free. The Microsoft Visual Studio Express Editions are simplified copies of the most popular components: C++, C#, Visual Basic, J#, SQL Server, & Visual Web Developer. [http://msdn.microsoft.com/vstudio/express/downloads/ Download] and install whichever component you think you might get some use out of since all we're really after here is the basic editor environment.
Chances are, you don't just have a copy of Visual Studio hanging around for your coding pleasure. Thankfully, Microsoft has released parts of VS for free. The Microsoft Visual Studio Express Editions are simplified copies of the most popular components: C++, C#, Visual Basic, SQL Server, & Visual Web Developer. [http://www.microsoft.com/express/ Download] and install whichever component you think you might get some use out of since all we're really after here is the basic editor environment.


Be sure to set up VS as your default XML editor. For Windows XP the easiest way to do this is to right-click on any XML file, click Open With...->Choose Program, select Microsoft Visual Studio from the list (the name may be different depending on the edition you select), check Always use the selected program, and hit OK.
Be sure to set up VS as your default XML editor. For Windows XP the easiest way to do this is to right-click on any XML file, click Open With...->Choose Program, select Microsoft Visual Studio from the list (the name may be different depending on the edition you select), check Always use the selected program, and hit OK.
== UI.xsd ==
Next, you will need to get a copy of UI.xsd. You can either use [[HOWTO: View Blizzard's Interface Code|Blizzard's UI extractor]] or go to [http://wdn.wowinterface.com wdn.wowinterface.com] and download the latest package. Navigate to the FrameXML folder and copy UI.xsd from there to your Interface\AddOns folder (you can actually use any location you like, but this is probably the simplest).


== The Ui Tag ==
== The Ui Tag ==


The last step is to use a Ui tag that points to the UI.xsd file we grabbed earlier. If you put the file in Interface\AddOns, your Ui tag should look like:
Now you need to change the Ui tag in your XML files to point to the XML schema. The simplest way to do this is to use the following tag:


  <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
  <nowiki><Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
  ..\UI.xsd">
  http://wowprogramming.com/FrameXML/UI.xsd"></nowiki>


You should change the second line if you put your UI.xsd in a different location or if your XML is in a subfolder of your addon's main folder.
This will pull the schema from the [http://wowprogramming.com WoWProgramming website]. If you'd rather use a local copy, you can either download [http://wowprogramming.com/FrameXML/UI.xsd that file], or extract it using [[HOWTO: View Blizzard's Interface Code|Blizzard's UI extractor]]. Then change the location in your Ui tag from <nowiki>http://wowprogramming.com/FrameXML/UI.xsd</nowiki> to the location of the file you downloaded (e.g. "C:/Program Files/World of Warcraft/Blizzard Interface Data (enUS)/FrameXML/UI.xsd")


That's all there is to it!
That's all there is to it!


[[Category:HOWTOs|Set up Visual Studio for WoW XML]]
[[Category:HOWTOs|Set up Visual Studio for WoW XML]]
Anonymous user