How to use Imports System.Xml in Open Office (Basic)?

177 Views Asked by At

Whenever I place Imports System.Xml above the rest of the code I get an error:
BASIC syntax error. Expected: Sub.

And when I place it inside any of the Subs I get another error:
BASIC syntax error. Unexpected symbol: Stop.

Are we even able to use Imports in the code in Open Office?
Or do I need to import in one of the menus?

1

There are 1 best solutions below

0
Jim K On

From my google search, Imports System.Xml is for .NET technologies. Is StarBasic a .NET technology? No.

You can create projects in C# or VB.Net that use LibreOffice's UNO API.

Or maybe you want to know how to work with XML in a LibreOffice macro. In that case, there are many different answers. Personally I would create a Python-UNO macro and start with import xml.etree. Alternatively, the UNO API provides access to the powerful XML libraries built into LibreOffice.