Discussion:
Coding XML
(too old to reply)
Michael Cope
2006-01-09 16:45:03 UTC
Permalink
I'm building my first skin, I'm not a programmer, and I've never worked with
xml before. I've created the images I need so far for a very basic skin. I've
copied the code from the "Building Your First Skin" reference, and a bit of
code from the programming reference. I've named my image files to match the
filenames in the code (to keep it simple) and changed the color codes to
match the colors I chose for clipping and mapping. Yet every time I copy a
new piece of code and test it out I get a generic parser error, until I
fiddle with it, taking out spaces, or adding spaces, etc.

I'm just sort of doing it by trial and error, and it has been hit and miss.
Sometimes, my skin container displays properly, the play button works and the
stop button closes the skin, but pause doesn't and my hover image won't
display. Other times when I convert my text file to .wms I'll either get the
generic parser error, or a skin already in my library displays.

I haven't begun to try to add anything more complex. Are there some basic
rules I ought to be aware of or conventions of coding xml that I'm missing?
Can you look at the code I'm trying to use and see what I'm doing wrong?

<THEME>
<VIEW
clippingColor = "#4B4B4B"
backgroundImage = "background.bmp"
titleBar = "false">

<BUTTONGROUP
mappingImage = "map.bmp"
hoverImage = "hover.bmp">

<BUTTONELEMENT
mappingColor = "#00FF00"
upToolTip = "Play"
onclick="jscript:player.controls.play()" />

<BUTTONELEMENT
mappingColor = "#FF0000"
upToolTip = "Stop"
onClick = "onclick="jscript:player.controls.stop()" />

</BUTTONGROUP>
</VIEW>
</THEME>
zachd [ms]
2006-01-12 08:53:01 UTC
Permalink
The parser errors should be straight-forward - your WMS (XML) file should be
loadable in Internet Explorer, if I recall correctly - that should let you
quickly move past XML errors, TMK.

Your onclick button is wrong it shouldn't be onclick:onclick, of course. =)
--
(speaking for myself and doing this in my free time)
See http://zachd.com/pss/pss.html for some helpful WMP info.
This posting is provided "AS IS" with no warranties, and confers no rights.
--
Post by Michael Cope
I'm building my first skin, I'm not a programmer, and I've never worked with
xml before. I've created the images I need so far for a very basic skin. I've
copied the code from the "Building Your First Skin" reference, and a bit of
code from the programming reference. I've named my image files to match the
filenames in the code (to keep it simple) and changed the color codes to
match the colors I chose for clipping and mapping. Yet every time I copy a
new piece of code and test it out I get a generic parser error, until I
fiddle with it, taking out spaces, or adding spaces, etc.
I'm just sort of doing it by trial and error, and it has been hit and miss.
Sometimes, my skin container displays properly, the play button works and the
stop button closes the skin, but pause doesn't and my hover image won't
display. Other times when I convert my text file to .wms I'll either get the
generic parser error, or a skin already in my library displays.
I haven't begun to try to add anything more complex. Are there some basic
rules I ought to be aware of or conventions of coding xml that I'm missing?
Can you look at the code I'm trying to use and see what I'm doing wrong?
<THEME>
<VIEW
clippingColor = "#4B4B4B"
backgroundImage = "background.bmp"
titleBar = "false">
<BUTTONGROUP
mappingImage = "map.bmp"
hoverImage = "hover.bmp">
<BUTTONELEMENT
mappingColor = "#00FF00"
upToolTip = "Play"
onclick="jscript:player.controls.play()" />
<BUTTONELEMENT
mappingColor = "#FF0000"
upToolTip = "Stop"
onClick = "onclick="jscript:player.controls.stop()" />
</BUTTONGROUP>
</VIEW>
</THEME>
Loading...