标题:关于.xml的问题
只看楼主
kevinxu0638
Rank: 2
来 自:江苏
等 级:论坛游民
帖 子:147
专家分:62
注 册:2009-10-19
结帖率:100%
 问题点数:0 回复次数:5 
关于.xml的问题
程序代码:
<gallery>
    <setup>
        <imgPath>images/</imgPath>

        <slideshowOn>false</slideshowOn>

        <thumbScrollSpeed>15</thumbScrollSpeed>
        <loadIndicatorOn>true</loadIndicatorOn>
        <loadIndicatorColor>0xFFFFFF</loadIndicatorColor>
        <slideshowDelay>4</slideshowDelay>
        <stopAutoOnClick>true</stopAutoOnClick>
        <randomImages>false</randomImages>
        <slideshowLoop>true</slideshowLoop>
        <bgCorner>10</bgCorner>
        <bgAlpha>1</bgAlpha>
        <bgColor>0xFFFFFF</bgColor>

        <imgScaleMode>scaleToAreaWidth</imgScaleMode>
        <imgScaleAlignVert>top</imgScaleAlignVert>
        <imgScaleAlignHor>center</imgScaleAlignHor>
        <imgMaskCorner>10</imgMaskCorner>
        <imgAlpha>1</imgAlpha>
        <imgShadowOn>true</imgShadowOn>
        <imgShadowDistance>4</imgShadowDistance>
        <imgShadowSize>4</imgShadowSize>
        <imgShadowAngle>90</imgShadowAngle>

        <imgCaptionFont>Verdana</imgCaptionFont>
        <imgCaptionColor>0xFFFFFF</imgCaptionColor>
        <imgCaptionSize>10</imgCaptionSize>
        <imgCaptionAlpha>0.7</imgCaptionAlpha>
        <imgCaptionPosition>bottom</imgCaptionPosition>
        <imgCaptionBgColor>0x000000</imgCaptionBgColor>
        <imgCaptionBgAlpha>0.7</imgCaptionBgAlpha>
        <imgCaptionShadowOn>true</imgCaptionShadowOn>
                <imgCaptionShow>onRollOver</imgCaptionShow>

        <transitionEffect>zoom</transitionEffect>
        <transitionStartPoint>right</transitionStartPoint>
        <transitionDirection>horizontal/ccw</transitionDirection>
        <transitionRotateDegrees>820</transitionRotateDegrees>
        <transitionIrisShape>square</transitionIrisShape>
        <transitionPixelDissolveSize>10</transitionPixelDissolveSize>
        <transitionEasingType>strong</transitionEasingType>
        <transitionEasingFunction>out</transitionEasingFunction>
        <transitionTime>1</transitionTime>

        <thumbWidth>40</thumbWidth>
        <thumbHeight>30</thumbHeight>
        <thumbMaskCorner>5</thumbMaskCorner>

        <spaceBetweenThumbs>10</spaceBetweenThumbs>
        <thumbRowsCount>1</thumbRowsCount>
        <thumbPosition>bottom</thumbPosition>
        <thumbToImgSpace>15</thumbToImgSpace>
        <thumbAlpha>0.5</thumbAlpha>
        <thumbReflectionsOn>true</thumbReflectionsOn>
        <thumbReflectionsAlpha>0.5</thumbReflectionsAlpha>
        <thumbReflectionsHeight>40</thumbReflectionsHeight>
        <thumbPreviewOn>true</thumbPreviewOn>
        <thumbPreviewMaskCorner>5</thumbPreviewMaskCorner>
        <thumbPreviewWidth>160</thumbPreviewWidth>
        <thumbPreviewHeight>120</thumbPreviewHeight>
        <thumbPreviewDistance>8</thumbPreviewDistance>
        <thumbPreviewAlpha>0.9</thumbPreviewAlpha>
        <thumbPreviewDelay>0.5</thumbPreviewDelay>
        <thumbPreviewShowAnimationTime>1</thumbPreviewShowAnimationTime>
        <thumbSoundOnRollover>sounds/over.mp3</thumbSoundOnRollover>
        <thumbSoundOnClick>sounds/click.mp3</thumbSoundOnClick>
        <thumbOutlineThick>1</thumbOutlineThick>
        <thumbOutlineAlpha>1</thumbOutlineAlpha>
        <thumbOutlineColor>0x000000</thumbOutlineColor>
        <thumbOutlineColorRoll>0xFFFFFF</thumbOutlineColorRoll>
        <thumbOutlineColorActive>0x8B0000</thumbOutlineColorActive>
        <thumbShadowOn>true</thumbShadowOn>
        <thumbShadowDistance>4</thumbShadowDistance>
        <thumbShadowSize>4</thumbShadowSize>
        <thumbShadowAngle>90</thumbShadowAngle>    

        <showButtonsOn>true</showButtonsOn>
        <buttonsAlignVert>top</buttonsAlignVert>
        <buttonsAlignHor>right</buttonsAlignHor>

                <backgroundImgPath>images/bg.jpg</backgroundImgPath>
        <backgroundImgAlpha>1</backgroundImgAlpha>

    </setup>

    <item>
        <thumb>1.jpg</thumb>
        <img>1.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>

    <item>
        <thumb>2.jpg</thumb>
        <img>2.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>

    <item>
        <thumb>3.jpg</thumb>
        <img>3.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>

    <item>
        <thumb>4.jpg</thumb>
        <img>4.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>

    <item>
        <thumb>5.jpg</thumb>
        <img>5.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>

    <item>
        <thumb>6.jpg</thumb>
        <img>6.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>

    <item>
        <thumb>7.jpg</thumb>
        <img>7.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>

    <item>
        <thumb>8.jpg</thumb>
        <img>8.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>

    <item>
        <thumb>9.jpg</thumb>
        <img>9.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>

    <item>
        <thumb>10.jpg</thumb>
        <img>10.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>

    <item>
        <thumb>11.jpg</thumb>
        <img>11.jpg</img>
        <caption>Art Flash Gallery is based on Adobe Flash (cs3) technology. It will help you easily post any images on your site in a matter of minutes.</caption>
    </item>



</gallery>


这个是一个.xml文件 我不知道在论坛哪个版块可以发 就在ASP了如果发错地方了 还望版主见谅 告诉小弟到哪儿发
好下面是问题 我想将红色部分的内容来自数据库 我把红的部分给成
<%
     Dim db,rs,strSql
    Set db=Server.CreateObject("ADODB.Connection")
    db.Open "Dsn=background"                           
    Set rs=Server.CreateObject("ADODB.Recordset")
    strsql="select * from lh "
    rs.Open strSql,db,1
    %>
<%
i = 0
Do While rs.EOF = False
%>

    <item>


        <thumb><%=rs("imgsrc1")%></thumb>
        <img><%=rs("imgsrc1")%></img>
        <caption><%=rs("sj_name")%></caption>

    </item>

    <%
    i = i + 1
    rs.MoveNext
Loop
   %>
这样不行出错了 有谁懂XML教教小弟 小弟没学过 现在做个东西用到了这个文件 帮帮忙~~小弟急

[ 本帖最后由 kevinxu0638 于 2010-11-23 14:33 编辑 ]
搜索更多相关主题的帖子: gallery images 
2010-11-23 14:30
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:0 
XML不同于HTML,XML要更严格,因此对于空格或特殊字符很敏感。
2010-11-23 21:11
gupiao175
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:40
帖 子:1787
专家分:7527
注 册:2007-6-27
得分:0 
https://bbs.bccn.net/viewthread.php?tid=304425&highlight=xml
参考一下这个例子。也许会给你一些思路!

Q:1428196631,百度:开发地 即可找到我,有事请留言!
2010-11-23 22:44
kevinxu0638
Rank: 2
来 自:江苏
等 级:论坛游民
帖 子:147
专家分:62
注 册:2009-10-19
得分:0 
回复 3楼 gupiao175
谢谢你的分享 你那个我看了一下 大致的意思明白点 就是将表单里的数据写入到xml中  我现在想要的是将数据库的内容写入到xml中
在研究看看怎么办吧  如果你知道怎么做还望指教

javascript、asp学习研究中 希望高手多多指教
2010-11-24 09:24
gupiao175
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:40
帖 子:1787
专家分:7527
注 册:2007-6-27
得分:0 
  操作方法完全一样。无非只是数据来源不同,一个是来自表单,一个是来自数据库,比如:

表单是username=request("表单名")这样取数据。然后放到savexml.asp代码里有段这样的代码:组合成XML数据格式,注意看红色数据部分!
 XMLnode=brstr&"<list>"&brstr & _
  "<id>"&id&"</id>"&brstr & _
  "<username>"&username&"</username>"&brstr & _
  "<fromwhere>"&fromwhere&"</fromwhere>"&brstr & _
  "<Posttime>"&Posttime&"</Posttime>"&brstr & _
  "<text>"&text&"</text>"&brstr & _
  "</list>"&chr(13)

同理数据库的道理也是一样的组合方式!读数据库里的数据应该楼主会吧!无非里面改改形式而已!
  "<id>"&rs("id")&"</id>"&brstr & _
  "<username>"&rs("username")&"</username>"&brstr & _
  "<fromwhere>"&rs("fromwhere")&"</fromwhere>"&brstr & _
  "<Posttime>"&rs("Posttime")&"</Posttime>"&brstr & _
  "<text>"&rs("text")&"</text>"&brstr & _
  "</list>"&chr(13)

Q:1428196631,百度:开发地 即可找到我,有事请留言!
2010-11-24 14:08
kevinxu0638
Rank: 2
来 自:江苏
等 级:论坛游民
帖 子:147
专家分:62
注 册:2009-10-19
得分:0 
回复 5楼 gupiao175
回头试试 现在这个地方被我换了一个效果 没用带xml的 呵呵
等忙完了研究下也好学习一下xml

javascript、asp学习研究中 希望高手多多指教
2010-11-24 14:21



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-326626-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.174398 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved