Parse Adob XMP data with Rev's XML lib?

Jan Schenkel janschenkel at yahoo.com
Thu Aug 23 06:43:53 EDT 2007


--- Sivakatirswami <katir at hindu.org> 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
> 
> 
> TIA
> Sivakatirswami
> 

I got it working by removing the namespaces from the
node path:
  put revXMLNodeContents(tMetaData,
"/xmpmeta/RDF/Description/description/Alt/li/")

Hope this helped,

Jan Schenkel.

Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


       
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=list&sid=396545433



More information about the use-livecode mailing list