View Full Version : Argument into Xml

07-08-2012, 09:18 PM

I am working with a silverlight project called Slide.Show by Vertigo, it is a microsoft open-source project. There is a j-script that constructs the slideshow itself. Then there is a configuration.xml that allows formatting so the show can be customized:

<configuration width="400" height="290" background="white">
<module type="SlideViewer" />
<module type="ProgressBar" />
<!--<module type="SlideDescription" />-->
<module type="NavigationTray">
<option name="slideShowNavigation.playTimerInterval" value="7000" />
<option name="thumbnailViewer.left" value="83" visible="false" />
<option name="visibility" value="Collapsed" />
<module type="SlideShowNavigation">
<option name="loopAlbum" value="True" />
<option name="visibility" value="Collapsed" />
<transition type="FadeTransition" name="CrossFadeTransition" />
<transition type="WipeTransition" name="WipeRightTransition">
<option name="direction" value="Right" />
<transition type="WipeTransition" name="WipeLeftTransition">
<option name="direction" value="Left" />
<dataProvider type="XmlDataProvider">
<option name="url" value="Data.xml" />

The data.xml is where the actual image urls are stored. This file has multiple <album> nodes. On the webpage, a script tag references the slideshow.js j-script, then there is a script tag to instance the slideshow, with an argument to the config. file:

<script type="text/javascript">
new SlideShow.Control(new SlideShow.XmlConfigProvider({url: "Configuration.xml"}));

I'm trying to modify this argument so as to isolate down to a single <album> node-rather than populate my web app with multiple data.xml files for single albums. I've tried various arguments to "getElementByTagName" or "currentAlbumIndex" etc, etc. Can anyone suggest syntax to have the "new SlideShow.Control" instance to access one single <album> node?

Thx for looking, and any suggestion.

07-09-2012, 01:55 AM
I'm not sure if this is what you need, but you can access the only <album> element by using the following:


where the variable xml represents the XML document or another element which contains the <album> element.