Folders and xml basic Pointing


I am going to assume that you some basic skills in creating files and folders.

                         STEP 1 Create Your Skin Folder
						 
First your going to create a folder that will contain all the files and folders
associated with your skin. You have to have a place for your the files that you
are going to create and your making a Winamp 3 skin so the fire up your windows
explorer and go find your Winamp3/skins folder.

Create a folder in your skins directory, Name it whatever you want.
Whatever you name it, is what will show in the skins menu when you open up winamp.
It is going to be your skin.

                          STEP 2 Your First XML File.
						  
O.k. now you've got your skin folder. We need to put something in it.
     
	                         The Skin.xml
							 
First let me explain a little how the xml heirarchy works.

Think of the xml files that your going to create as a chain or links on a webpage.
The first xml file called the skin.xml points to the files that you create, in addition
to the default files that make the skin run in Winamp 3.
And in turn some of the xml files that you create later will point or link to other xml files. 
In some cases it is manatory that certain files link together. 
This is the case with the element and normal files. But we will talk about that later.	
For now what we need to be concerned about is making sure that we have the right files 
being pointed to in the skin xml.	

                           Lets make that file.
  
The best and easiest way of	making the skin.xml is to copy and paste the info from the 
default skin xml. I use a text editor that allows me to have multiple files open at the same time. 
It's easier to make the connection between files if you can see how they are linking together.	 

Open up the default skin.xml and paste all the information into a new text file. 

Lets look at what we have.

             [?xml version="1.0" encoding="UTF-8" standalone="yes"?]

                    [WinampAbstractionLayer version="0.7"]
                       [skininfo]
                         [version]0.01[/version]
                         [name]My skin[/name]
                         [comment]what for?[/comment]
                         [author]It's Me, Who else[/author]
                         [email]me@coolskins.com[/email]
                         [homepage]coolskins.com[/homepage]
                         [screenshot][/screenshot]
                       [/skininfo]

                    [include file="xml/studio-elements.xml"/]
                    [include file="xml/player.xml"/]
                    [include file="xml/eq.xml"/]
                    [include file="xml/thinger.xml"/]
                    [include file="xml/minibrowser.xml"/]
                    [include file="xml/components.xml"/]
                    [include file="xml/scripts.xml"/]

                    [/WinampAbstractionLayer]


In the code above you will see some tags that are standard tags. For the purpose of this tutorial
we are going to skip the first and second and ending tag. All you need to know is that they have
to be in there. If you want an explanation of them. There is info on several sites listed in the
sticky threads on the Winamp.com forums.

The first section of tags is are self explanatory. The latest version of Winamp changes a bit.
But it means the same. Skin info. What you put in here is displayed in the skin switcher of
Winamp 3.

The tags we are concerned with are these. 

                    [include file="xml/studio-elements.xml"/]
                    [include file="xml/player.xml"/]
                    [include file="xml/eq.xml"/]
                    [include file="xml/thinger.xml"/]
                    [include file="xml/minibrowser.xml"/]
                    [include file="xml/components.xml"/]
                    [include file="xml/scripts.xml"/]

Each of these tags point to another .xml file. We are creating a new skin from scratch so we
need to change most of these tags. The main thing here is to realize that this is where Winamp 3
gets all of it's inital information. We need to change all of the tags except 1 in this section
of tags. All of the tags except [include file="xml/player.xml"/] needs to be changed.

The reason we need to change these is that they point/link to specific files in the skin.

Important stuff here

                   [include file="xml/studio-elements.xml"/]

  Gets changed to: [include file="..default/xml/studio-elements.xml"/]

What this does is direct the Winamp to the default xml file.
You need to add ..default/ to the beginning of all the tags, 
with the exception of this one  [include file="xml/player.xml"/] 
Which we will be creating next.
 
So if you've understood all this. You should have changed your tags and now your file info looks like this.

             [?xml version="1.0" encoding="UTF-8" standalone="yes"?]

                    [WinampAbstractionLayer version="0.7"]
                       [skininfo]
                         [version]0.01[/version]
                         [name]My skin[/name]
                         [comment]what for?[/comment]
                         [author]It's Me, Who else[/author]
                         [email]me@coolskins.com[/email]
                         [homepage]coolskins.com[/homepage]
                         [screenshot][/screenshot]
                       [/skininfo]

                    [include file="..default/xml/studio-elements.xml"/]
                    [include file="xml/player.xml"/]
                    [include file="..default/xml/eq.xml"/]
                    [include file="..default/xml/thinger.xml"/]
                    [include file="..default/xml/minibrowser.xml"/]
                    [include file="..default/xml/components.xml"/]
                    [include file="..default/xml/scripts.xml"/]

                    [/WinampAbstractionLayer]
 
Your done: Save this file as skin.xml in the folder that you created and your on your way. 
We have told the skin engine to use all the default xml files except player.xml.
 
If you understood nothing. Just copy the text above, change the square brackets to pointed ones
and move on to the next page.
 
A short pointer lesson. Breaking down a single tag.
 
[include file="..default/xml/thinger.xml"/] 
include file= 
Just what it reads. Tells the skin engine to include the following file in the tag.

..default/xml/thinger.xml"
Tells the skin engine that the file it wants to include is in the default skin folder.
In a folder called xml. And the file name is thinger.xml

Thats about it for this section. If you understand this then the next part is a breeze.
If you don't understand this then it will all come together in the next section.
								  
								  
                           Next page ->

Introduction Folders and xml basic Pointing 
The xml folder and player.xml The elements of disaster Laying it all out