Hi all,
I’m migrating some Excels with VBA to LO Base and Basic.
One of the functionalities I need is to load an XML file and extract node values from it (e.g. for inserting/updating some table rows).
I’ve been googling around and reading up from several sources (LO Documentation, LibreOffice 24.2 SDK API Reference, the Pitonyac docs …) and managed to build some code that can load an XML file and navigate the XML Dom tree …
However, when I try to obtain a node’s value using .getNodeValue(), I get an empty string (whereas .getLocalName() does return the node’s name …).
Furthermore, when a node has attributes in it’s opening tag, I do manage to get the attribute value using the same .getNodeValue() on a node representing an attribute …
I have compiled a sample odb & xml file demonstrating the issue :
XMLhandling.zip (4.8 KB)
Just unzip the file (keep odb and xml files in the same folder), open the odb and run the ParseXMLfile macro from the Basic IDE …
And last but not least : running LO 24.2.7.2 on Linux Mint 22 …
Any assistance pointing me in the right direction would be greatly appreciated !