Topic: Dynamic XML issue with 2.1.1

I hate to ask for help with stuff like this, but I'm stumped.  I've searched the forums and it seems like people were having just the opposite issue that I am when they were on 2.1.  I'm getting the "Cannot Parse Gallery XML" error.

Here's the site I'm working on:

You can see I'm embedding using the recommended code:

            <script type="text/javascript" src="/svcore/js/simpleviewer.js"></script>

            <script type="text/javascript">
                var flashvars = {};
                    flashvars.galleryURL = "/xml.php?id=1568&skin=default";
                    //flashvars.galleryURL = "/gallery.xml";

                var params = {};
                    params.wmode = "transparent";

                jQuery(document).ready(function () {
                    SV.simpleviewer.load("sv-container", "960", "640", "", true, flashvars, params);
            <div id="sv-container"></div>
            <!-- END SIMPLEVIEWER EMBED -->

Note the galleryURL line.  If yo go to that address you can see the XML is valid.  That php file includes the following, although I've tried it without the charset too:

    header ("Content-type: text/xml; charset=UTF-8");

If I comment the dynamic galleryURL and uncomment the static one, it works perfectly.  This is in the normal Flash version.  I can also leave the dynamic galleryURL and load the HTML5 version and it loads fine.  So it's specifically the combination of the dynamic galleryURL and the Flash version.  This happens in both Firefox and IE.

Here are direct links to both of the XML files for comparison: … in=default

Once I get this resolved I'll be upgrading to Pro, since I definitely need some more of the customization options.  I'd greatly appreciate any assistance on this.  Also, to confirm... does simpleviewer load jQuery on its own?  If so, does it first make sure it's not already loaded?  I'm loading the latest from a CDN and I'd hate to have to load another 56k if it's not necessary.

Re: Dynamic XML issue with 2.1.1

Also tried a Content-Type of application/xml in the PHP.  Still doesn't work.  :/

3 (edited by szsori 2010-12-20 06:07:33)

Re: Dynamic XML issue with 2.1.1

Some additional info.  I set up a duplicate copy of my PHP file that does everything except actually display the output.  Instead of displaying, it does a read('gallery.xml'); exit;.  I also copied the output directly from my web browser and copied it back into my server side template and also directly into gallery.xml.  SimpleViewer works perfectly when using the passthru version and breaks on the normal version.  I've analyzed the output, including all of the headers, in Firebug and the W3C validator and they look identical to me.  So I'm confused as hell.

Here are both: … in=default … in=default

The second one works in SimpleViewer but the first does not.

For giggles, here's the code from xml_passthru.php.  The only change with xml.php is that it doesn't have the read and exit lines.

    header ("Content-type: text/xml;charset=UTF-8");

    ## Skin is passed as a param
    $smarty->assign('skin', $_GET['skin']);

    ## Get our photos
    $resultsarray = array();
    $stmt=mssql_init("stored_proc_name", $connection);
    mssql_bind($stmt, "@ID", $_GET['id'], SQLINT4, FALSE);
    $result = mssql_execute($stmt);
    while ($row = mssql_fetch_array($result, MSSQL_ASSOC))  {
        $resultsarray[] = $row;
    $smarty->assign('photos', $resultsarray);

    ## Display
    $smarty->display($_GET['skin'] . '/xml.tpl');

4 (edited by marktoth 2011-02-04 18:30:15)

Re: Dynamic XML issue with 2.1.1

I'm having the same problem!
here is the embed code
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = " … ellist.xml";

$(document).ready(function () {
SV.simpleviewer.load('sv-container', '900px', '500px', 'transparent', true,
<div id="sv-container"></div>

and the url to the dynamically generated xml … ellist.xml
and the url to the page

While feed is generated with .NET I do put the
case ".XML":
   context.Response.ContentType = "text/xml";

with no luck am I jst missing something??????
Could it be that these are two different servers?  That I can't cross boundries from to