Link to home
Start Free TrialLog in
Avatar of chefkeifer
chefkeiferFlag for United States of America

asked on

xml spry data set

I am trying out this spry data set thing and i cannot get the images to show it just shows the actual url..am i not writing the xml correctly

here is a snippet of the xml...
<office_inventory>
        <thumb>http://www.thebarnettecompanies/images/officefurnture/sm_rd_woodtable-thumb.png</thumb>
        <quantity>500</quantity>
        <type>Workstations</type>
        <model>Haworth</model>
        <size>N/A</size>
        <image>http://www.thebarnettecompanies/images/officefurnture/sm_rd_woodtable.png</image>
        <description>this is where the description of the unit or model will go. need more details about his item.</description>
    </office_inventory>

Open in new window

Avatar of asafadis
asafadis
Flag of United States of America image

I'ts not supposed to show the actual image.  XMLs are just data, it's up to you and your script to interpret it.

You could also try adding the actual IMG tag in the "thumb" and "image" nodes.  Keep in mind that they will have to be HTML encoded though.

HTML Encoder: http://www.opinionatedgeek.com/dotnet/tools/htmlencode/Encode.aspx
<office_inventory>
    <thumb>&lt;img src=&quot;http://www.thebarnettecompanies/images/officefurnture/sm_rd_woodtable-thumb.png&quot; /&gt;</thumb>
    <quantity>500</quantity>
    <TYPE>Workstations</TYPE>
    <model>Haworth</model>
    <size>N/A</size>
    <image>&lt;img src=&quot;http://www.thebarnettecompanies/images/officefurnture/sm_rd_woodtable.png&quot; /&gt;</image>
    <description>this IS WHERE the description of the unit OR model will go. need more details about his item.</description>
</office_inventory>

Open in new window

Avatar of chefkeifer

ASKER

where in the dataset are you supposed to interpret the xml data...

<div class="MasterDetail">
      <div spry:region="ds1" class="MasterContainer">
        <div class="MasterColumn" spry:repeat="ds1" spry:setrow="ds1" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{thumb}</div>
      </div>
      <div spry:detailregion="ds1" class="DetailContainer">
        <div class="DetailColumn">{quantity}</div>
        <div class="DetailColumn">{TYPE}</div>
        <div class="DetailColumn">{model}</div>
        <div class="DetailColumn">{size}</div>
        <div class="DetailColumn">{image}</div>
        <div class="DetailColumn">{description}</div>
        <div class="DetailColumn">{type}</div>
      </div>
      <br style="clear:both" />
    </div>
Assuming you did not follow my second suggestion (which is good because it's one or the other), try this:
<div class="MasterDetail">
    <div spry:region="ds1" class="MasterContainer">
        <div class="MasterColumn" spry:repeat="ds1" spry:setrow="ds1" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected"><img src="{thumb}" /></div>
    </div>
    <div spry:detailregion="ds1" class="DetailContainer">
        <div class="DetailColumn">{quantity}</div>
        <div class="DetailColumn">{TYPE}</div>
        <div class="DetailColumn">{model}</div>
        <div class="DetailColumn">{size}</div>
        <div class="DetailColumn"><img src="{image}" /></div>
        <div class="DetailColumn">{description}</div>
        <div class="DetailColumn">{type}</div>
    </div>
    <br style="clear:both" />
</div>

Open in new window

i did the first suggestion...but to no avail...

not sure why it does not work
when you do the wizard i made sure that the thumbs and image column were html...but now instead of showing the actual url it now shows nothing when testing...

It might be working... you just can't see it because the URLs are wrong (or at least they look wrong).

Is this right?
http://www.thebarnettecompanies/
ASKER CERTIFIED SOLUTION
Avatar of asafadis
asafadis
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
dude..how stupid am I..maybe the tailgating beers before football today screwed me up...cheers and the url thing is the issue..thanks