Hello and welcome to our community! Is this your first visit?
Register
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
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Argument into Xml

    Hi,

    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:

    <code>
    <configuration width="400" height="290" background="white">
    <modules>
    <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>
    <module type="SlideShowNavigation">
    <option name="loopAlbum" value="True" />
    <option name="visibility" value="Collapsed" />
    </module>
    </modules>
    <transitions>
    <transition type="FadeTransition" name="CrossFadeTransition" />
    <transition type="WipeTransition" name="WipeRightTransition">
    <option name="direction" value="Right" />
    </transition>
    <transition type="WipeTransition" name="WipeLeftTransition">
    <option name="direction" value="Left" />
    </transition>
    </transitions>
    <dataProvider type="XmlDataProvider">
    <option name="url" value="Data.xml" />
    </dataProvider>
    </configuration>
    </code>

    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:

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

    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
    Location
    Ukraine
    Posts
    71
    Thanks
    1
    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:
    Code:
    xml.getElementsByTagName("album")[0]
    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
    •