John,
I think you are misunderstanding two things about the Bridge Metadata object and XMP.
First, the Metadata object will return only Strings, not objects that represent nodes in the XMP data model.
Second, the xpath syntax you are trying to use to access the x-default member of the array is incorrect.
Try a script like the following:
#target bridge
var thumb = app.document.selections[0];
var md = thumb.synchronousMetadata;
try {
md.namespace = "http://ns.adobe.com/xap/1.0/rights/";
var usageTerms = md["UsageTerms[@xml:lang='x-default']"];
$.writeln( usageTerms );
md["UsageTerms[@xml:lang='x-default']"] = "Changed";
} catch( e ) {
$.writeln( e );
}
This may be a usable workaround for you if you need to deploy scripts that run on CS2 and cannot use XMPScript.
If you can I recommend using CS3 to develop the scripts for CS2 because it has some tools that may make your job easier. First, you can use utiltiy functions in XMPScript like XMPUtils.composeLanguageSelector() to create well-formed xpaths to use in your CS2 scripts. Second in Bridge CS3 exceptions thrown by the XMP toolkit when the Metadata object tries to get a property (ex: when a script calls var foo = md["bogus/xpath"]) will be reflected as JavaScript exceptions with the error message from the internal C++ exception. If, for example, the property name or namespace URI are bad, it's now much easier for the script writer to determine what is wrong than it was in CS2. This is one of my favorite, unsung new features in CS3.
-David