XML documentation creation.

steve holmes's picture

Hi everyone, I am working on a little application that really works like a slide show but what I would like to do is run the application from an XML file. The XML file has the folder location of the images as well as any text that needs to go with them. The only issue is I really have no idea what the best way to create the XML file without writing it manually. Is there a way to do this with quartz composer or is it better done else where.

Cheers for any help. Steve

cybero's picture
Re: XML documentation creation.

Use Dashcode.

Create a new project, then import and examine closely the Twitterverse XML Example in the Developer's Folder.

Adapt & Survive :-)

usefuldesign.au's picture
Re: XML documentation creation.

Depend's if it's a once off write or many writes (or very many you may wish to automate). Also if you are writing it or it's for 3rd parties to write there own, in which case maybe an Applescript to locate the file, tag it and append text to each one then generate the XML might be better. Lots of programs (including a simple text editor) can make the XML other apps make more specific kinds of XML files (conforming to web protcols for eg) which you probably don't require. Indesign can also spit out XML from Layouts if you template it correctly.

usefuldesign.au's picture
(No subject)

psonice's picture
Re: (No subject)

Yeah, I agree.

cwright's picture
Re: (No subject)

Crap, psonice, I was gonna nuke the empty comment, but now you've gone and replied to it :) If I delete it now, everyone will accuse me of censorship or something ;)

gtoledo3's picture
Re: (No subject)

usefuldesign.au wrote:

This guy took the words right out of my mouth.

Lol...text edit!

psonice's picture
Re: (No subject)

What do you mean? Hey, where's his comment gone?! ;D

cybero's picture
Re: XML documentation creation.

Something like this should work with a multiplexer

<?xml version="1.0" encoding="UTF-8" ?>
<entries>
   <entry>
      <label>JPEG 1</label>
      <value>1</value>
        <path>JPEG1.jpg</path>
        <width>350</width>
        <height>233</height>
        <thumbw>75</thumbw>
        <thumbh>50</thumbh>
   </entry>   
   <entry>
      <label>JPEG 2</label>
      <value>2</value>
        <path>JPEG2.jpg</path>
        <width>350</width>
        <height>233</height>
        <thumbw>75</thumbw>
        <thumbh>50</thumbh>
   </entry>
   <entry>
      <label>JPEG 3</label>
      <value>3</value>
        <path>JPEG3.jpg</path>
        <width>350</width>
        <height>233</height>
        <thumbw>75</thumbw>
        <thumbh>50</thumbh>
   </entry>
</entries>

:-)

cybero's picture
Proof of Concept Solution XML Document Slideshow Example

Ah well, although I normally use the Image Downloader and Composition Downloader patches, I just might find that having a simple, standard XML file template could prove useful, adding meta data access and so on.

Whatever, this post prompted me to finally work out an XML compliant solution to running a slideshow.

Proof of Concept Solution XML Document Slideshow Example

PreviewAttachmentSize
XMLSlidesWithTransitions.zip59 KB

cybero's picture
The easiest F.O.C application to do XML documentation creation.

The easiest F.O.C application to do XML documentation creation. with is

iPhoto - just remember to choose xml as your export format and select the metadata sets you want from the Export dialog box. This will output a .plist which you can then save as a plain text .xml file.

Job's a Goodun' & You're Sorted :-)

steve holmes's picture
Re: The easiest F.O.C application to do XML documentation ...

I had a quick look at iphoto and could not see an option to xml, it was probably right in front of me but I couldn't see it. Steve

gtoledo3's picture
Re: The easiest F.O.C application to do XML documentation ...

I was wondering about that.... I haven't looked, and thought it's interesting that you can do xml with that.

I've used PlistEdit Pro for this kind of stuff, and it has been really snazzy.

cybero's picture
Re: The easiest F.O.C application to do XML documentation ...

iPhoto Procedure [produces its own plist]

a] open iPhoto.

b] create album of images you want to output the xml for. You can use new album, new album from selection or smart album.

c] select the album you want to export & then ensure you are selecting XML Property List as shown in picture below.



d] Then you can open up the plist file created in Property List Editor , I use Dashcode and save as a text document with .xml extension. I could have used Property List Editor, but it tends to strip the following out

 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

so I use the following settings as shown in the picture below from Dashcode, upon the .plist file created by iPhoto.



Similar process works for movies and tunes from iTunes.

PreviewAttachmentSize
iPhoto_Export.jpg
iPhoto_Export.jpg20.39 KB
xmlfromexport.jpg
xmlfromexport.jpg30.71 KB

steve holmes's picture
Re: The easiest F.O.C application to do XML documentation ...

Ah I have just spotted you need metadata export plugin for iphoto, will have a look for this and see how well it works, thanks for the tip. Steve

usefuldesign.au's picture
(No subject) is a subject of a kind of domain you've never been

Gonna have to reply to my own post here... leave town for two days (for a funeral) and come back to mockery and sarcasm LoL.

Wanted to provide an empty space for other's to have input...

yeah lame comeback... it was the old double post but I couldn't hide it from the hawks who sore above me at Kineme, hmmm

cwright's picture
Re: (No subject) is a subject of a kind of domain you've ...

I hope you haven't take it too seriously -- I can't speak for the others, but as for myself, it's only good-natured fun at the situation. :) From my personal correspondence with psonice and gtoledo3, I'm pretty sure their approach was of a similar sort.

usefuldesign.au's picture
Re: (No subject) is a subject of a kind of domain you've ...

relax already, I'm an Australian (aussie). We just work hard and take the piss out of each other every day!

leegrosbauer's picture
Re: (No subject) is a subject of a kind of domain you've ...

regarding good natured fun .. can you still edit it? If so, at this point you've got 'em already commenting on just about any humorous posting that might tickle your fancy. heh. :-)

usefuldesign.au's picture
Re: (No subject) is a subject of a kind of domain you've ...

"If so, at this point you've got 'em already commenting on just about any humorous posting that might tickle your fancy. heh. :-)"

Most useful post of the week. You were one step ahead of me but no, once the reply is in, you're cactus. Actually that would make a funny hack to a serious-tone forum, allow invisible edits in posts after replies and start confusing the hell out of the forum regulars... you should get IP on that right away

leegrosbauer's picture
Re: (No subject) is a subject of a kind of domain you've ...

On one occassion at least, I did experience prolonged editing capability in these forums. That's why I inquired. On my own double posting circumstance I was able to go back a week later and insert a video. I guess no one had replied to it at that point in time. Just as well, I suppose. I'd probably get myself booted for forum abuse if that check and balance weren't in place. ahaha. :-)

cybero's picture
Re: The easiest F.O.C application to do XML documentation ...

Still available, needs iPhoto 7 , Metadata Export for iPhoto works like a charm , but only with iTunes 7, so the project site states.

gtoledo3's picture
Re: (No subject) is a subject of a kind of domain you've ...

hahahah....

.... and it is so peaceful and mellow in the world of QC discussion, compared to Audio Engineer-land, where people tend to be a bit more like pitbulls.

At least we don't describe QC plug-ins as "creamy, sexy, warm, punchy, crystalline"... etc...

Consider that one of the top experts in microphones describes sonics in terms of "sex appeal", like a bad Will Ferrell sketch... and then be thankful you are doing programming in QC. [... and I do understand what the fella means all the same, this is not a total slag of the world of "AE (audio engineering)...]

ah... I digress.

gtoledo3's picture
Re: The easiest F.O.C application to do XML documentation ...

Cybero, you are a madman (and I mean the in a GOOD way).

I'm looking forward to looking over this and some of the javascript stuff you posted in the recent past.

THIS is what it is about! You learn, you give back :) You friggin' hippie programmer, you.