Parse Adobe XMP data with Rev's XML lib?

Ken Ray kray at sonsothunder.com
Thu Aug 23 00:51:28 EDT 2007


On Wed, 22 Aug 2007 17:49:24 -1000, Sivakatirswami wrote:

> I am unable to parse the following using rev's library.
> I'm not an xml expert... but, since several nodes all begin with
> 
> "rdf" I assume we need to refer to a node like this:
> 
>   put revXMLNodeContents(tMetaData, 
> "/x:xmpmeta/rdf:RDF/rdf:Description/dc:description/rdf:Alt/rdf:li/")
> 
> 
> but rev throw and error "xmlerr, can't find element"
> 
> 
> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Public XMP Toolkit Core 4.0">
>    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
>       <rdf:Description rdf:about=""
>             xmlns:dc="http://purl.org/dc/elements/1.1/">
>          <dc:description>
>             <rdf:Alt>
>                <rdf:li xml:lang="x-default">Caption can be found 
> here</rdf:li>
>             </rdf:Alt>
>          </dc:description>
>       </rdf:Description>
>    </rdf:RDF>
> </x:xmpmeta>
> 
> In the meantime i can hack this by removing all tags as there is not 
> data except the caption
> in any of the nodes

<shamelessPlug>
It also works properly with my XML Library 
(http://www.sonsothunder.com/products/xmllib/xmllib.htm), just as you'd 
expect:
	
  put 
stsXML_GetNodeData("/x:xmpmeta/rdf:RDF/rdf:Description/dc:description/rdf:Alt/rdf:li/")
  --> Caption can be found here

And of course being transcript only, it can be used with Rev's XML DLL 
as well.
</shamelessPlug>

(Katir, you already have my library, but this is for anyone else 
interested...)

:-)

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list