• Hi Guest: Welcome to TRIBE, the online home of TRIBE MAGAZINE. If you'd like to post here, or reply to existing posts on TRIBE, you first have to register. Join us!

Any XML programmers out there???

Zorro

TRIBE Member
I have a quick question for any xml programmers.

I currently have a small script like this

<images directory="images">
<imageNode jpegURL="img_0.jpg" thumbURL="tn_img_0.jpg" title="Image 0">Comments on Image 0</imageNode>
<imageNode jpegURL="img_1.jpg" thumbURL="tn_img_1.jpg" title="Image 1">Comments on Image 1</imageNode>
<imageNode jpegURL="img_2.jpg" thumbURL="tn_img_2.jpg" title="Image 2">Comments on Image 2</imageNode>
<imageNode jpegURL="img_3.jpg" thumbURL="tn_img_3.jpg" title="Image 3">Comments on Image 3</imageNode>
<imageNode jpegURL="img_4.jpg" thumbURL="tn_img_4.jpg" title="Image 4">Comments on Image 4</imageNode>
<imageNode jpegURL="img_5.jpg" thumbURL="tn_img_5.jpg" title="Image 5">Comments on Image 5</imageNode>
<imageNode jpegURL="img_6.jpg" thumbURL="tn_img_6.jpg" title="Image 6">Comments on Image 6</imageNode>
<imageNode jpegURL="img_7.jpg" thumbURL="tn_img_7.jpg" title="Image 7">Comments on Image 7</imageNode>
<imageNode jpegURL="img_8.jpg" thumbURL="tn_img_8.jpg" title="Image 8">Comments on Image 8</imageNode>
<imageNode jpegURL="img_9.jpg" thumbURL="tn_img_9.jpg" title="Image 9">Comments on Image 9</imageNode>
<imageNode jpegURL="img_10.jpg" thumbURL="tn_img_10.jpg" title="Image 10">Comments on Image 9</imageNode>
</images>
However as one can see this would me updating this script every time the client upload new images.

My question is can I set up some sort of on the fly array. That checks how many images are in the folder then sets-up the imagenod per amount of images?

Make sense???
Any help would be GREAT!!!!
 

Ditto Much

TRIBE Member
Originally posted by Zorro
I have a quick question for any xml programmers.

I currently have a small script like this



However as one can see this would me updating this script every time the client upload new images.

My question is can I set up some sort of on the fly array. That checks how many images are in the folder then sets-up the imagenod per amount of images?

Make sense???
Any help would be GREAT!!!!
what kind of system are you running on. Are your XML files purely for data storage or do you use them for loop structures and logic?


(if not I suggest perl generates the xml file, either with a timed scheduled process or with an event handler watching the directory)
 

Zorro

TRIBE Member
My xml code is just for checking the image names in the folder and then being parsed through flash.

Could you maybe give me a little more info on geberating this with perl .

:)
 

stir-fry

TRIBE Member
in windows, you could use the Filesystemobject to loop through all of the files in said folder and you could write each file you come across into the xml file.
sounds pretty easy to me
 

Ditto Much

TRIBE Member
Originally posted by Zorro
My xml code is just for checking the image names in the folder and then being parsed through flash.

Could you maybe give me a little more info on geberating this with perl .

:)
do you know perl at all? or are you looking for me to do your homework :p
 
tribe cannabis accessories silver grinders

matty

TRIBE Member
It amazes me that with all the dev forums on the web people still ask for programming help on tribe. :confused:
 

Ditto Much

TRIBE Member
Originally posted by stir-fry
in windows, you could use the Filesystemobject to loop through all of the files in said folder and you could write each file you come across into the xml file.
sounds pretty easy to me
Generation of the file is trivial but its the cake. Triggering the generation is the icing.


It amazes me that with all the dev forums on the web people still ask for programming help on tribe.

its a friendly place with many coders.
 

~atp~

TRIBE Member
Originally posted by m..m
It amazes me that with all the dev forums on the web people still ask for programming help on tribe. :confused:
It's a comfort thing I bet...if you look dumb, may as well do it somewhere where it's less likely you'll be made fun of. ;)

Kind of a "fit into the crowd" thing eh.


As for the question:

I would agree with Ditto, a simple perl script running from the crontab would be best, although, are you running this in windows? if so, you could potentially write a simple script to do it...
 

Zorro

TRIBE Member
Originally posted by m..m
It amazes me that with all the dev forums on the web people still ask for programming help on tribe. :confused:
Well dispite all the silly and stupidness that goes on at Tribe I figured there where some knowledgable programmers on the board.

Obvisously with your comment I may be wrong.

To carry on I've long worked for a company where my Job was stricly design, layout, storyboarding and creating the image of that which the company we are working for. Because of this my programing skills consist mostly of knowing what I can do as suppose to knowing how to do it.

I am now taking on a project of my own and was running along smoothly until this little part slowed me down.

I figured this might just be a small simple script and someone would help me. I am willing to give credit where credit is due and perhaps some sort payment in one form or another. ;)
 
tribe cannabis goldsmith - gold cannabis accessories
Top