Author Topic: Xml code problem  (Read 1450 times)

tfk

  • Jr. Member
  • **
  • Posts: 31
Hi

I was hoping someone could help me with a problem with some xml code. I'm not a coder, so I copy and paste from different TM's. (this one is mostly an edit of Redwings "Cover List".

In the code below, everything works fine if I remove the "child" info in the "track info" part.  With the child info added, there is an error in line 30, but I can not find it.  Been playing around with it for a while without any luck.

Thanks in advance

---------------------
<?xml version="1.0" encoding="utf-8"?>
<root>

 <settings enableScaling="true" />
<screenSaver>
  <settings idlePeriod="0" />
  <settings monitor="1" otherMonitors="blackout" />
</screenSaver>

<!-- Album Cover -->
 <element type="AlbumCover" x="-100" y="-100" width="10" height="10" min="10" max="10"></element>
 <element type="PlayerBar" xAnchor="Panel.Right" x="70" yAnchor="Panel.Bottom" y="-75" width="0" height="0"></element>
 <element name="#Cover" type="AlbumCover" xAnchor="Panel.5" x="0" yAnchor="Panel.43" y="0" align="Middle.Left" widthDock="Panel.Width.43" width="0" heightDock="Panel.Width.43" height="0" brightness="1.0"></element>

<element type="Time" xAnchor="Panel.Right" x="-160" y="10" width="160" align="Right" font="Segoe UI" style="Regular" size="14" fg="250,250,250" ></element>


  
          <!-- #Album Tracks Panel -->
 <element type="AlbumTracks"  xAnchor="Panel.Center" x="20" yAnchor="#Cover.Top" y="0" widthDock="X:Panel.Right" width="14" heightDock="Y:#Cover.Bottom" height="0"  rowPadding="1" font="Segoe UI" style="Semilight" size="13" fg="255, 255, 255" fg2="0, 153, 153" mouseOverFg="255,255,0" >
 <child id="TrackNo" align="right" x="10" font="Segoe UI" style="Semilight" size="13" width="40"/>
 <child>  </child>
 <child id="Title" width="540"/>
 <child id="Duration" width="80" align="right" font="Segoe UI" style="Semilight" size="13" />
 <child>  </child>
 </element>

  <!-- Track Info -->
    <element type="Field" id="Title" xAnchor="panel.right" x="6" yAnchor="Panel.95" y="-60" width="0" align="center" font="Segoe UI" style="Regular" size="18" fg="0, 153, 153" >
 <child id="TrackNo" align="right" x="10" font="Segoe UI" style="Semilight" size="12" width="40"/>
 <child>  </child>
 <child id="Title" width="540"/>
 <child id="Duration" width="75" align="right" font="Segoe UI" style="Semilight" size="12" />
 <child>  </child>
 </element>


<!-- Progress Bar -->
 <element type="SoundGraph"   xAnchor="Panel.10" x="0" yAnchor="Panel.94" y="12" widthDock="x:Panel.88" width="0" height="35" fg="0, 153, 153" bg="30,250,250,250" ></element>
 <element type="PlayPosition" xAnchor="Panel.5" x="0" yAnchor="Panel.93" y="20" width="80" reservedWidth="80" font="Segoe UI" style="Semibold" size="16" fg="255,255,255" ></element>
 <element type="PlayDuration" xAnchor="Panel.90" x="0" yAnchor="Panel.93" y="20" width="90" font="Segoe UI" style="Semibold" size="16" fg="255,255,255" ></element>

</root>

---------------------------------------------------------

redwing

  • Guest
In the code below, everything works fine if I remove the "child" info in the "track info" part.  With the child info added, there is an error in line 30, but I can not find it.

I'm not sure I follow you. How do you want the track info displayed? Just title or with other tags?

tfk

  • Jr. Member
  • **
  • Posts: 31
Sorry, I see your confusion. It should be:   <element type="Field" id="Artist"

Artist - Title - Album (Year)

(Preferably with title in Italic)

redwing

  • Guest
Try this:

Code
<!-- Track Info -->	
<element type="Field" id="Artist" xAnchor="Panel.10" x="0" yAnchor="Panel.Bottom" y="-100" widthDock="x:Panel.90" width="0"  align="center" font="Segoe UI" style="Regular"  size="18" fg="0,153,153" >
<child> - </child>
<child id="Title" />
<child> - </child>
<child id="Album" />
<child> (</child>
<child id="Year (yyyy)" />
<child>)</child>
</element>

(Preferably with title in Italic)

That won't be possible to keep it center aligned. To achieve that, remove "align=center" and add font & style attributes to title. Also you will need to reposition it as the whole track info will then be left aligned.

tfk

  • Jr. Member
  • **
  • Posts: 31
That works perfectly.

Thanks a lot Redwing :(Y)  :)