Skip navigation
PietjePost
Currently Being Moderated

XML not displaying correctly when larger

Feb 14, 2013 2:21 AM

Hi,

When my XML dataset exceeds 2350 lines, SpryDOMUtils.js seems to ad a <tab> to the XML string and it's not displayed correctly in it's container.

I included 2 screenshots to show what's happening. Tnx a lot!!

screenshots.jpg

 
Replies
  • Currently Being Moderated
    Feb 14, 2013 2:32 AM   in reply to PietjePost

    Please supply a link to the site

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 14, 2013 3:44 AM   in reply to PietjePost

    There are a couple of irregularities in the markup

    1. Line 12 a stray <br />. This irritates IE

    2. Line 85 the red highlighted quotes are missing

    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve rsion=6,0,29,0"

    3. Line 91 a stray </embed>

     

    Looking at the raw XML file, there are some irregularities such as extra blank lines (e.g. line 412). I don't think these matter, but it is worthwhile keeping in mind.

     

    On my test server, I added another 150 odd lines to the XML and noticed no problem.

     

    I did, what I usually do, place ALL scripts and links to scripts at the bottom of my document. Don't know if this makes a difference, but again it worked for me.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 14, 2013 3:56 AM   in reply to Ben Pleysier

    Forgot to say, the first line in my XML file is always

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

    That may also make a difference.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 14, 2013 5:33 AM   in reply to PietjePost

    Eerst naar bed, het is hier half één 's nachts; ik zal morgen weer kijken.

     

    from Down Under

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 16, 2013 6:36 PM   in reply to Ben Pleysier

    Sorry for the delay, I have spent some time trying to find the culprit. Finally I decided to start afresh with the following markup, which works quite well in all browsers.

     

    <!doctype html>
    <htm>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css">
    </head>
    
    <body>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 1</div>
        <div class="AccordionPanelContent">
          <div id="div1">
            <table align="top" cellpadding="5">
              <tr id="tr1">
                <td  valign="top">{datum}</td>
                <td valign="top"><a href="{link}">{inhoud}</a></td>
              </tr>
            </table>
          </div>
        </div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 2</div>
        <div class="AccordionPanelContent">Content 2</div>
      </div>
    </div>
    <script src="SpryAssets/SpryAccordion.js"></script> 
    <script src="SpryAssets/SpryData.js"></script> 
    <script src="SpryAssets/SpryDOMUtils.js"></script> 
    <script src="SpryAssets/SpryTooltip.js"></script> 
    <script src="design_template_info12.js"></script> 
    <script type="text/javascript">
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    </script>
    </body>
    </html>

     

    May I suggest that you copy and paste the markup into a new document to then start adding your own stuff, making sure that you test in IE7 or IE8 at each step.

     

    Note that I have left xpath.js out of the markup. I think it will work either way. Just keep an eye on it.

     

    PS

    I did reformat the XML to delete all of the empty lines. Not sure if this helped or not. You can do this within DW as follows

    _Capture.jpg

     

    Message was edited by: Altruistic Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 18, 2013 1:18 AM   in reply to PietjePost

    Hi PietjePost,

     

    Can I mark Altruistic Gramps answer as correct? That will help other users having a similar problem.

     

    Thanks,

    Preran

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 18, 2013 4:55 PM   in reply to PietjePost

    There is no need for the xml name space declaration. The markup that I showed is more than ample when only showing the data within an accordion panel.

     

    I would use the above markup as a starting point and build the rest of you document around that.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points