Getting the XMP data from the file is fine. An example of the data I'm getting is:
<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b" xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:subject><rdf:Bag xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:li>Hong Kong</rdf:li><rdf:li>Asia</rdf:li><rdf:li>Market</rdf:li><rdf:li>Night</rdf:li></rdf:Bag></dc:subject></rdf:Description><rdf:Description rdf:about="uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b" xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:creator><rdf:Seq xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:li>Phil Larby</rdf:li></rdf:Seq></dc:creator><dc:title><rdf:Alt xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:li xml:lang="x-default">Temple Street Night Market</rdf:li></rdf:Alt></dc:title><dc:description><rdf:Alt xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:li xml:lang="x-default">Temple Street Night Market</rdf:li></rdf:Alt></dc:description></rdf:Description><rdf:Description xmlns:MicrosoftPhoto="http://ns.microsoft.com/photo/1.0/"><MicrosoftPhoto:LastKeywordXMP><rdf:Bag xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:li>Hong Kong</rdf:li><rdf:li>Asia</rdf:li><rdf:li>Market</rdf:li><rdf:li>Night</rdf:li></rdf:Bag></MicrosoftPhoto:LastKeywordXMP></rdf:Description></rdf:RDF></x:xmpmeta>
However when I try to unmarshal this into objects it fails due to the namespace prefixes. The error I get is:
javax.xml.bind.UnmarshalException: unexpected element (uri:"adobe:ns:meta/", local:"xmpmeta"). Expected elements are <{}xmpmeta>
If I manipulate the XMP data as a string string to remove the namespace prefixes e.g. <x:xmpmeta /> become <xmpmeta /> then it works, but this is pretty unreliable as I keep encountering new namespaces as I try different files and basically this just doesn't seem to be the 'right' way to go about it.
Any pointers on how to handle the namespace prefixes in JAXB, as I'm failing to get to the bottom of it at the moment!
I'm using the ControlP5 library and am struggling to set the selected value of the dropdown programatically? I have failed to find anything in the documentation, but this seems like it should be possible.
Basically, I am using a dropdown to select from a list of predefined states for my program. When the program first starts, I want the dropdown to show the intial state. All the other controls I am using have a setValue or equivalent that I can use but seemingly not the dropdown list which defaults to having nothing selected.
Here's a quick video of my app called Flitter that displays tweets using the Twitter streaming API.
http://vimeo.com/32130318
This is a fairly quick and dirty first pass at this app as I had to get it together on a tight deadline for a competition entry, but will be expanding on it in the future as I think it has quite a bit of potential.