Question
Getting attributes from xml-node
Hello all,
I am trying to use the LrXml functions for analyesing an xml-file.
I am parsing the file, so that I get a XML DOM object (domObj) of the following node
öklasjdf
asdfas
Now I want to access the attributes, so I wrote in lua
local attr = domObj.attributes()
But I didn't find a way to access the attributes itselfs, I think mainly because I am not very familiar with lua. I tried the following two code sequences, but I always didn't get a result.
local var1 = attr._mngid.value
local var2 = attr["_mngid"].value
Can somebody give me a hint, who the correct code sequnce would be to access the attribute of the node (that means, getting the value "23" out of it)?
Thanks much in advanced!
best regards
Bernhard
I am trying to use the LrXml functions for analyesing an xml-file.
I am parsing the file, so that I get a XML DOM object (domObj) of the following node
öklasjdf
asdfas
Now I want to access the attributes, so I wrote in lua
local attr = domObj.attributes()
But I didn't find a way to access the attributes itselfs, I think mainly because I am not very familiar with lua. I tried the following two code sequences, but I always didn't get a result.
local var1 = attr._mngid.value
local var2 = attr["_mngid"].value
Can somebody give me a hint, who the correct code sequnce would be to access the attribute of the node (that means, getting the value "23" out of it)?
Thanks much in advanced!
best regards
Bernhard