arrays? maybe I am wrong! Help me out!

Hello all,
I don't have a problem but I am lost to even start with...
Okay,
I have this list box... say, call it staffList
and lets say that these are the values of staffList
-----------------------
Fred.jpg
George.jpg
Greg.jpg
Anna.jpg
Alice.jpg
Betty.jpg
------------------------

and I want this to be an XML in this form-----

---------------------------------------------------------------
< xml version="1.0" encoding="UTF-8" >
<SIMPLEVIEWER_DATA maxImageDimension="480" textColor="0xFFFFFF" frameColor="0xFFFFFF" bgColor="0x181818" frameWidth="20" stagePadding="40" thumbnailColumns="3" thumbnailRows="3" navPosition="right" navDirection="LTR" title="Example Title" imagePath="" thumbPath="">
<IMAGE>
    <NAME>Fred.jpg</NAME>
    <CAPTION>Fred</CAPTION>
</IMAGE>
<IMAGE>
    <NAME>George.jpg</NAME>
    <CAPTION>George</CAPTION>
</IMAGE>
<IMAGE>
    <NAME>Greg.jpg</NAME>
    <CAPTION>Greg</CAPTION>
</IMAGE>
<IMAGE>
    <NAME>Anna.jpg</NAME>
    <CAPTION>Anna</CAPTION>
</IMAGE>
<IMAGE>
    <NAME>Alice.jpg</NAME>
    <CAPTION>Alice</CAPTION>
</IMAGE>
<IMAGE>
    <NAME>Betty.jpg</NAME>
    <CAPTION>Betty</CAPTION>
</IMAGE>
</SIMPLEVIEWER_DATA>


-------------------------------------------------------

notice that <NAME> is the value from each row from staffList...

I would be able to make it so that one of the names come out but how in the world
Do I assign each row for every <NAME> is has to fill out and delete the unecessary ones...

Would I have to use databases or such
or can this be possible without a database (that would be smaller and simpler!)

For now, this array thing AND XML would be great but I don't expect XML to be answered
yet because for now, I am just trying to figure out HOW THEN in this forum, I will ask for
XML. Thank You anyway if you want to answer XML (I mean that would BE PERFECT!)
If you are answering just the array part,
please expect the output to be in a text box(multirows) or on a label... or a message box....

Thank You all smart & problem solving people!
This is the only way we make the world go around (maybe not)
Thank You!
Keehun Nam





Answer this question

arrays? maybe I am wrong! Help me out!

  • Mike408

    hi,

    i was lost in something like that but i found this link and it was helpfull to me you can take a look to it it has some videos explaning databinding and xml

    http://msdn.microsoft.com/vbasic/atthemovies/dataandxml/default.aspx

    they provide many ways my advice to you to pick one way and to concentrate with just one way of them because if you tried to follow all of them that will wast your time like what happend to me just pick the best way that fit you

    bye



  • using Drinks.Vodka.Martini

    I meant that in <NAME> values,
    .jpg would be added but for <CAPTION>
    no .jpg would be added!

    Thank You again!


  • arrays? maybe I am wrong! Help me out!