xml as SQLite field

I have looked at the example projects and searched the forums without finding an answer. The question is simple, the project isn’t.

The question: How do I complete the statement “xXMPData = rsLR_Temp.Field(“xmp”).whatfieldtype”

Details: I have hacked the Adobe Lightroom catalog to the point I can get all the information about my images that I need to build my SQLite database in Xojo except one field which seems to reside only in an XML field. One of the catalog tables contains a field for each image that contains an XMLDocument. I get basically how to use the built in XML classes to process the document but how do I extract the document from the SQLite row?

When I just use stringvalue, and pass xXMPData to

dim xml As XmlDocument Try xml.LoadXML(xImageXML) Catch e As XMLException MsgBox("XML Error.") Return End Try
I get a Nil Exception.

The first several lines of the XML field are:

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c011 79.156380, 2014/05/21-23:38:37 "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:aux="http://ns.adobe.com/exif/1.0/aux/" xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/"

Thanks
Bill

Just to clarify, you’re getting a NilObjectException and not a XMLException?

NOE would be better because it means you’re just missing something, XMLException means that the Adobe Lightroom XML is not going to be able to be parsed by the Xojo XML engine.

Remove the Try/Catch and see where it is breaking.

Uh… try

Dim xml as New XmlDocument

You can’t call LoadXmL on an uninitialized object.

Greg was correct. I changed it to dim xml as New XmlDocument and that fixed the problem. Thanks so much guys…