Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Thanked 0 Times in 0 Posts

    Argument into Xml


    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.

  • #2
    New Coder
    Join Date
    Jul 2012
    Thanked 18 Times in 17 Posts
    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.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts