How Do You Use XML To Create Image Upload On A WebSite?

Hello,
Could some one please help me understand how to create web image gallery and web video gallery using XML? I have found few xml codes that could be used to do this but I am not so sure how to use them. I want my clients to be able upload images and videos with linking thumbnails to Image and or Videos. Do you think the codes I included in this question will help me achive this goal? And do I need to put all in one and in the same directory so it will work? Please help with your idea and tell me how you would use these codes and how you may step-by-step implement the idea your self to your own web site.
I have also included the instruction I found on the web with the codes.
Starting with You Tube, API on their video gallery, here are the codes I found,
Assume you are to use the YouTube, XML code; What will you change here so it will work on your own www.domain.com?
<% Dim xml, xhr, ns, YouTubeID, TrimmedID, GetJpeg, GetJpeg2, GetJpeg3, thumbnailUrl, xmlList, nodeList, TrimmedThumbnailUrl Set xml = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")
xml.async = False
xml.setProperty "ServerHTTPRequest", True
xml.Load("http://gdata.youtube.com/feeds/api/users/Shuggy23/favorites?orderby=updated") If xml.parseError.errorCode <> 0 Then
    Response.Write xml.parseError.reason End If Set xmlList = xml.getElementsByTagName("entry") Set nodeList = xml.SelectNodes("//media:thumbnail") For Each xmlItem In xmlList
    YouTubeID = xmlItem.getElementsByTagName("id")(0).Text
    TrimmedID = Replace(YouTubeID, "http://gdata.youtube.com/feeds/api/videos/", "")
    For Each xmlItem2 In nodeList
        thumbnailUrl = xmlItem2.getAttribute("url")
        Response.Write thumbnailUrl & "<br />"
    Next     Next    
%>
For the image gallery, the following are the codes I found with your experience do I need to use the entire codes or just some of them that I should use?
CODE #01Converting Database queries to XML
Using XML as data sources presumes the existence of XML. Often, it is easier to have the server create the XML from a database on the fly. Below are some scripts for common server models that do such a thing.
These are starting points. They will need to be customized for your particular scenario.
All these scripts will export the data from a database table with this structure:
ID: integer, primary key, autoincrement
AlbumName: text(255)
ImagePath: text(255)
ImageDescription: text(2000)
UploadDate: datetime
The output of the manual scripts will look like:
<?xml version="1.0" encoding="utf-8" ?>
  <images>
     <image>
          <ID>1</ID>
          <album><![CDATA[ Family ]]></album>
          <path><![CDATA[ /family/us.jpg ]]></path>
          <description><![CDATA[ here goes the description ]]></description>
          <date><![CDATA[ 2006-11-20 10:20:00 ]]></date>
     </image>
     <image>
          <ID>2</ID>
          <album><![CDATA[ Work ]]></album>
          <path><![CDATA[ /work/coleagues.jpg ]]></path>
          <description><![CDATA[ here goes the description ]]></description>
          <date><![CDATA[ 2006-11-21 12:34:00 ]]></date>
     </image>
  </images>
These are all wrapped in CDATA because it is will work with all data types. They can be removed if you know you don't want them.
Note: If using the column auto-generating versions, ensure that all the column types are text. Some databases have data type options like 'binary', that can't be converted to text. This will cause the script to fail.
CODE #02ASP Manual: This version loops over a query. Edit the Query and XML node names to match your needs.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Dim MM_conn_STRING
MM_conn_STRING = "dsn=image_gallery;uid=xxxx;pwd=xxxx"
%>
<%
Dim rsImages
Dim rsImages_cmd
Dim rsImages_numRows
' Query the database and get all the records from the Images table
Set rsImages_cmd = Server.CreateObject ("ADODB.Command")
rsImages_cmd.ActiveConnection = MM_conn_STRING
rsImages_cmd.CommandText = "SELECT ID, AlbumName, ImagePath, ImageDescription, UploadDate FROM images"
rsImages_cmd.Prepared = true
Set rsImages = rsImages_cmd.Execute
' Send the headers
Response.ContentType = "text/xml"
Response.AddHeader "Pragma", "public"
Response.AddHeader "Cache-control", "private"
Response.AddHeader "Expires", "-1"
%><?xml version="1.0" encoding="utf-8"?>
<images>
  <% While (NOT rsImages.EOF) %>
     <image>
          <ID><%=(rsImages.Fields.Item("ID").Value)%></ID>
          <album><![CDATA[<%=(rsImages.Fields.Item("AlbumName").Value)%>]]></album>
          <path><![CDATA[<%=(rsImages.Fields.Item("ImagePath").Value)%>]]></path>
          <description><![CDATA[<%=(rsImages.Fields.Item("ImageDescription").Value)%>]]></description>
          <date><![CDATA[<%=(rsImages.Fields.Item("UploadDate").Value)%>]]></date>
     </image>
    <%
       rsImages.MoveNext()
     Wend
%>
</images>
<%
rsImages.Close()
Set rsImages = Nothing
%>
CODE #03
Automatic: This version evaluates the query and automatically builds the nodes from the column names.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Dim MM_conn_STRING
MM_conn_STRING = "dsn=image_gallery;uid=xxxx;pwd=xxxx"
%>
<%
Dim rsAll
Dim rsAll_cmd
Dim rsAll_numRows
' Query the database and get all the records from the Images table
Set rsAll_cmd = Server.CreateObject ("ADODB.Command")
rsAll_cmd.ActiveConnection = MM_conn_STRING
rsAll_cmd.CommandText = "SELECT * FROM Images"
rsAll_cmd.Prepared = true
Set rsAll = rsAll_cmd.Execute
' Send the headers
Response.ContentType = "text/xml"
Response.AddHeader "Pragma", "public"
Response.AddHeader "Cache-control", "private"
Response.AddHeader "Expires", "-1"
%><?xml version="1.0" encoding="utf-8"?>
<root>
  <% While (NOT rsAll.EOF) %>
     <row>
         <%
             For each field in rsAll.Fields
             column = field.name
         %>
          <<%=column%>><![CDATA[<%=(rsAll.Fields.Item(column).Value)%>]]></<%=column%>>
          <%
             Next
          %>
     </row>
    <%
       rsAll.MoveNext()
     Wend
%>
</root>
<%
rsAll.Close()
Set rsAll = Nothing
%>

OK, I understand - thanks for that.
I thought the whole process was supposed to be a bit more seemless? Having to upload/download documents and manually keep them in sync will leave a lot of room for errors.
It's kinda painful the way iOS doesn't have folders. It makes things incompatible with the Mac and means you can't group files from multiple apps into a single project - who organises their digital life by the apps they use?
I think I'll recommend they use their iPad only.
Thanks for that.
Cheers
Ben

Similar Messages

  • How do you use a dmg file image to download windows through boot camp?

    after reaching my limits in finding the answer to this problem/question i have, i finally decided to post it for everyone to feel my pain
    so i dont know if i would be spanked or something but i downloaded a windows xp sp3 from the internet through torrent
    it was originally an iso file so i changed it to a dmg by using disk utility
    now heres the problem:
    after that, i opened the dmg file image and mounted the virtual drive
    then when i started up the boot camp installation and clicked the "Start Installation" after about fifteen seconds it said that it couldn't find any disk installers!
    AARRGG
    it would be awesome if someone could help me
    and this other question that i did not mention above is:
    when you run windows xp on Parallels, is it slower than when you use windows on a PC or through boot camp?
    thanks and hope you have a nice day

    Hi and welcome to Discussions,
    so i dont know if i would be spanked or something but i downloaded a windows xp sp3 from the internet through torrent
    I don't spank you for that but I also don't comment on it as maybe this post will be deleted soon !
    it was originally an iso file so i changed it to a dmg by using disk utility
    now heres the problem:
    after that, i opened the dmg file image and mounted the virtual drive
    then when i started up the boot camp installation and clicked the "Start Installation" after about fifteen seconds it said that it couldn't find any disk installers!
    The BootCamp Assistant requires Windows to be on a bootable CD/DVD and will not work with any kind of images, iso or dmg.
    when you run windows xp on Parallels, is it slower than when you use windows on a PC or through boot camp?
    Yes, since it is not running 'natively' , using the real hardware, but it is running on a virtualized environment.
    How much slower really depends on the kind of programs you use in Windows, with typical Business/Office programs you might not even notice any slower performance, but with programs that depend on having access to the 'real' hardware, you will notice the slowness often right down to be un-useable.
    thanks and hope you have a nice day
    You too
    Stefan

  • How do you use Class Auto Create Parameter of Web Resource Type in WPC?

    In our project, we decided to use wpc for news implementation and we need that content web be  automatically  placed on a container.
    I saw the parameter, but I didn't find more helpful information
    Regards.
    null

    Thanks so much!
    Like I said I am new to Apple products so it's still unclear to me which programs I do or don't need as I'm setting up and configuring all my software and devices.
    The Logitech Control Center appears to work perfectly for what I was trying to do!
    I accidently clicked "This helped me" instead of "This Solved My Question", sorry about that this was a solve!

  • Cssmill - how do you use it?

    Looking at cssmill for the first time, and i'm trying to figure out some things...
    1) how would you use cssmill to create the default - out-of-the-box stylesheets? The ones that are deployed after install don't have any 508 styles, but they are generated by cssmill. You would have to edit the template files to exclude these styles.
    (edit, i see now that removing the d_ styles is done by the make_508_css task, but its erroring out on my machine)
    2) out of the box css has no comments. cssmill includes all comments. run them though a css compressor first?
    3) make_portal_css. is this a relic from yesteryear? why would the portal ever use mainstyle-en.css instead of mainstyleX-en.css?
    Is it worth trying to make changes to template files or just edit the resulting CSS manually?
    I'm thinking this should be my methodology:
    1) Create custom color.propertiles file(s) that make sense for my organization
    2) Generate css file
    3) paste all my custom stuff at the top
    I'd really love to get away from using cssmill completely but not sure if its possible.
    Edited by: Joel Collins on May 18, 2009 12:33 PM
    upon closer inspection, it looks liek the make_508_task is failing (silently) wtih the error: "The requested operation cannot be performed on a file with a user-mapped section open". this is what removes the comments and d_ lines
    Edited by: Joel Collins on May 18, 2009 1:22 PM
    i updated the java file under bin and it works now
    http://joelcollins.posterous.com/cssmill-508-fix

    I'm testing out a new way to do the stylesheets....let me know if you guys have any ideas or concerns...
    so i generate the stylesheets using cssmill...but then i rename them to mainstyleXX-en-orig.css
    then I create a custom stylesheet, wtih all of our custom styles (we override a lot of stuff...)
    then, i add @import statements at the top of that css class for the orig...
    so my stylesheet looks liek this:
    @import "mainstyleXX-en-orig.css";
    @import "analytics.css";
    html { height:100%; }
    body { font-family:arial, Verdana, sans-serif; font-size:12px; line-height:1.4em;  color:#333333; margin:0px; padding:0px; height:100%;}
    p { margin:1em 0;padding:0; }
    a:link     { color:#003399; text-decoration:none; }
    a:visited { color:#810081; text-decoration:none; }
    a:link:hover { text-decoration:underline;}
    a:visited:hover { color:#810081; text-decoration:underline; }
    ... etc...
    This way, when you orerride a style that is in the original stylesheet, you dont' have to modify the orig.css...

  • How do you use image tags

    How do you use Image tags. Thank you

    Hi John,
    Have you seen this video? It describes how to apply default image tags to your pictures, and then describes how to create new, custom tags. Is there something more specific that you're wondering about? I'd love to help!
    Cheers,
    Michael

  • How can I use some of the image i am working on to paint with? like if I wanted to give someone an extra eye in the forehead, ow could i then paint their own i in the forehead? I know there is a paint tool for that, i just can't find it ... :/

    How can I use some of the image i am working on to paint with? like if I wanted to give someone an extra eye in the forehead, ow could i then paint their own i in the forehead? I know there is a paint tool for that, i just can't find it ... :/

    It sounds like you are talking about the cloning tool?
    Tool looks like this:
    Then when selected you can change the size of the brush and using Alt (windows) and Command (Mac) to select your region you want to copy then start to create you cloned image.
    Hope this helps?

  • How do you use ReadyHosting's myLittleTools?

    A client I do some work for occasionally, has normally wanted me to add links to various partner websites. These have all been pretty small over the years I’ve done this work for him, like make 5 at most. Well now he’s hit me
    with about 2 dozen partners that he wants a link to. When it gets to this point I think of databases.
    I created a MS SQL Server database on Ready Hosting’s server, associated with my client’s account. (Got his permission before doing so.) Then I created a user for that, so that I could get into it. Ready Hosting uses something
    called “myLIttleTools” for managing and administering one’s SQL Server databases on their servers. So I tried going into it, entering the credentials that I created. But it refuses to allow me to log in. I get the following error message:
    “Error -2147217843
    Login failed for user ‘MyID'.
    Provider=sqloledb;Data Source=ReadyHostingServer;Initial Catalog=ClientDB;User Id=MyID;Password=MyPassword;Connect Timeout=120;”
    (Clearly I’ve changed the credentials here; they’re not what I’ve created.)
    Two days ago I opened a help ticket with them. Still haven’t heard from them.
    So I’m asking here, does anyone have any experience with SQL Server database management on ReadyHosting? How am I supposed to log in when it refuses to accept the credentials for the user I created on it? They want you to use
    this “myLittleTools” thing, but WOW how do you use that when you’re prevented from even getting into the door?
    Rod

    Readyhosting is still around? They were a really good host back at the turn of the century then were bought by a company that proceeded to hire incompetents and became totally unreliable. I'd have thought they folded a decade ago.
    As others said, this is an issue to be resolved through Readyhosting's support personnel. EW is not really deigned for managing database servers. If their connection permits it you can use the MS SQL tools to manage remotely (doubt they allow it though)
    and most people use MS Web Developer Express for their database work on small websites not EW.
    Free Expression Web Tutorials
    For an Expression Web forum without the posting issues try
    expressionwebforum.com

  • Hi - how do i use iTunes to create ring tones using music in my library, hi - how do i use iTunes to create ring tones using music in my library

    hi - how do i use iTunes to create ring tones using music in my library, hi - how do i use iTunes to create ring tones using music in my library

    As stated... Google would be your Friend...
    But you can have a look here as well...
    Ringtones FAQs
    http://support.apple.com/kb/HT1491
    Create and Buy Ringtones
    http://support.apple.com/kb/HT1693

  • HT2534 How do you use an iTunes card after you have redeemed it?? I have entered my code for redeem and when I click on purchase song it asks me for a credit card?!

    How do you use your iTunes card after you have redeemed it. I have entered my redeem code and my balance is $20.00 but when I go to buy a song it asks me for my credit card details...?!

    If you set up an Apple ID already and didn't enter credit card details because you were planning on using gift cards only, you probably set up the account incorrectly. If this is the case, you will have to enter the credit card details even if you want to use only gift cards and download free content only. Yoy will not have to use the card, but you can't use the ID without entering the card details now. You may be able to remove the card as well after the card is verified for use by Apple by editing your account details.
    There is a very specific manner in which you have to set up an ID without using a credit card. You can read about it here.
    http://support.apple.com/kb/HT2534
    See this about changing iTunes account information.
    http://support.apple.com/kb/ht1918
    If you decide to create a new ID now, you will new another email address as wel, because the email address that you are currently using will already be associated with the ID that you just set up.
    I am making certain assumptions here and reading between the lines of your post, so if I am guessing incorrectly, post back with more details.

  • How do you use Logical Expressions in the RTF?

    How do you use logical expressions such as "and", "or" when you want to do conditional printing of XML data in the RTF?
    For example:
    if (conditionA and conditionB) then...
    Regards,
    Smita

    Thank you Sir! - I had something else wrong in the expression, but the error message I was getting was a bit misleading and sent me down the wrong path.
    Thanks again, and best regards:)

  • Using XML to create files through API

    Hi.
    I created a new custom type - a subclass of "Document", with a few private attributes.
    I wrote a small XML file that creates an instance of that type.
    I have no problem using that XML with FTP or with the web interface - it parses the XML automatically and creates my custom file.
    However, when I try to use the java API to do the same, it just copies the XML file into IFS, but doesn't parse it or creates the custom file that is defined in it.
    I am using the IFSFileSystem.createDocument method, with parsing set to true, and "null" for the callback parameter.
    Of course, the XML parser is registered (as I said, it works with FTP and web interface).
    Please help.
    Thanks, Edo.

    Sure .. you can use XML as the data source. If you have DW8,
    you can even
    do it right in the Dreamweaver Interface.
    Nancy Gill
    Adobe Community Expert
    BLOG:
    http://www.dmxwishes.com/blog.asp
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
    A Beginner's
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "melneum" <[email protected]> wrote in
    message
    news:e7n37t$40m$[email protected]..
    > Is it possable to use xml to create user lists that can
    then be searched
    > to
    > allow access to a section of a site like you can do with
    asp? I would
    > prefer
    > not to use any database stuff on a site i am currently
    working on but need
    > a
    > secured login area.
    >
    > Any ideas??
    >

  • Migration Monitor - How Are You Using It?

    Hello!
    In this short discussion, you can help us to better understand how you are using the Migration Monitor – this better understanding would help the team responsible for this tool to adapt their automated tests accordingly and would also influence the future development decisions in this area.
    What is the Migration Monitor?
    The Migration Monitor is part of the software provisioning manager as of SAP NetWeaver 2004 SR1, but can also be executed manually. It uses the EXT, WHR, STR, TPL files to control the unload and load, to accelerate the load by automatic parallelization, and to generate the R3load task and command files (TSK and CMD files).The Migration Monitor does the following:
    Creates R3load command files
    Creates R3load task files if required
    Starts R3load processes to unload the data
    Transfers packages from source to target host if required
    Starts R3load processes to load data as soon as a package is available
    Informs the person performing the system copy in case of errors
    How Do You Use the Migration Monitor?
    Only for sequential unload and load - that is, you first unload to a local system, transfer the export directory to the target host, and then load using this directory.
    For parallel unload and load:
    a) Unload and load using a shared network directory
    b) Unload and load using transfer by FTP
    c) Unload and load using sockets
    In your reply, please just name your preferred option (1, 2a, 2b, or 2c) – and why you prefer it.
    Thanks a lot for your support!
    Boris

    Boris,
    Options - All three but mainly Option # 2.
    Option # 1 - To dynamically increase the number of parallel process from Source system. But in case of homogeneous system copies with massive database sizes, the database proprietary methods comes in handy than the R3load procedures.
    Option # 2 - To reduce downtime in migrations (hetero combinations) thru parallel export/import of data loads.
    Hope it helps.
    Regards,
    Srinivas K.

  • How do you pass XML as a URL param?

    How do you pass XML as a URL param?
    Thanks!

    I don't know why I wasn't thinking about this when I made my
    last post. If they're pasting some XML into a form, that's one
    thing. But if they need to send XML to your site from their own,
    you can setup a Coldfusion Component (CFC) as a Web Service to
    accept XML through a WSDL call.
    Check out the
    Coldfusion
    Developers Center for
    articles
    on creating web services

  • How do you use your iPod Touch?

    I'm thinking of buying an ipod touch 5th gen, but I have to convince myself that it would help me significantly before I drop $300 on a device. My question: how do you use your iPod Touch, aka, what things have helped you significantly, excluding games? I've heard a ton about how awesome the new version is, and everything about its camera and retina display, but I want to know that I would actually use one first....
    Thanks.

    Surf the web from bed and coffee shops/bookstores.  When in a store that has WiFi I may research a product that looks interesting to buy.
    It is a camera that is always with you (assuming you always take it with you), so you can capture that picture that happens once in a life time.  Also the camera is great when shopping for "Big Ticket" items as you can take pictures to remind you of things you were looking at so you can do additional research at home before making your final decision.
    Check my mail from bed and coffee shops/bookstores, etc... when WiFi is available.
    Use it as an alarm clock, meeting reminder, todo reminder.
    Take notes (not school notes, just ideas, stuff I maybe want to buy, useful information I may pick up in a bookstore, books I may want to buy, etc...)
    Contains my contacts for friends, family, and businesses (plumber, dentist, doctor, etc...)
    Plays music, or in my case, I listen to podcasts
    Reading ebooks.  I use it a lot to read ebooks.  It is always with me, so I can read a book anywhere, such as waiting in a doctor/dentist office, at the motor vehicle registry.  And reading in bed is great as when you fall asleep, it remembers what page you were on vs that book that drops onto your face and wakes you back up while at the same time loosing your page
    The Maps app is great for finding where something is located, and plotting how to get there (not as good as having an iPhone with GPS, but still useful).  Also the satellite images make it easier to visualize where you are going.
    When connected to WiFi it can be used for Facetime when calling a friend or family member that also has an iOS device.  Seeing a loved one when they are not near can be emotionally satisfying.  You can also make skype calls.
    I use 1Password to store all my passwords.  It keeps them secure, I always have them with me, and I do not need to use the same password over and over again, or make them too simple to remember.  1Password has a built-in browser so you it can substitute the correct password for the web site you are visting without actually needing to look it up.
    1Password related but not passwords.  Because 1Password encrypts all the data it holds, I can also store sensitive information (such as medical conditions, or other information I do not want made public should my device be lost or stolen), yet always have that information with me should I need it.
    I can get the weather.  This week, I've been using an app to get high/low Tide infromation, plus sunrise information.  But getting weather info when you wake up so you can plan your day and if you need to shovel the driveway before going to work.  I find it easier to get the weather from my iOS device than it is to use my laptop or turn on the Weather Channel.
    Calclator.  2+2 = 4, but there are times you do need to get something right, and calculators are useful. They have all kinds available, including hexidecimal calculators for programmers.
    RSS newsfeed reader (I follow about 20+ feeds, including these discussions groups via RSS feeds).
    Travel services.  Most airports have WiFi, and you can get updated travel info for your flights via some speciallized travel apps.
    If you are into tracking your car mileage, gas usage, maintenance costs, etc..., there are apps for that.
    While you can watch video on your iOS device (downloaded movies, YouTube), you can also stream movies from services such as Netflix.  This can be useful when traveling, or if you are stuck in bed with a cold, or if you have lost control of the "Remote" and do not want to watch "Dancing with the Stars"
    TV related, there are apps that will give you the TV schedule for your area, so you can browse the shows on this evening.
    List.  You can keep lists, including grocery shopping lists, items to pack for a trip lists, things to do for that bathroom remodel, things you need to get before school starts, Christmas lists, etc....  NOTE:  Ideas for Christmas/Birthday/Anniversary gifts may come anytime during the year, but if you do not write them down, you may be scratching your head when the event arrives.  Putting them in a list can help you later on.
    You can get a Level app.  You may laugh, but I have actually used my iOS device to check if something was level.  It was there, and a carpenters level was not.  Not perfect, but it did what I needed at the time.
    Finding a good resturante (Yelp, Urbanspoon, etc...).  The iOS device can be very helpful in finding a good nearby place to eat when away from home, or even discovering a new play where you live to get out of that eat at the same place rut.
    That is some of the things I use my iOS device for.

  • I was wondering how I could use Photoshop to create a custom border

    I was wondering how I could use Photoshop to create a custom border around the featured slider image on my homepage.
    I am using a Wordpress theme called Gazetti if that helps. Thanks in advance for any help given.

    the simple answe is no, the macbook pro screen cannot be used as a second display for other devices

Maybe you are looking for