0

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?

oscark
  • 13
  • 3
  • OpenOffice.org is obsolete. LibreOffice is mostly used now, and there is also Apache OpenOffice which strives to maintain a traditional (older) way of doing things. – Jim K Jan 26 '22 at 22:34

1 Answers1

0

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.

Jim K
  • 12,824
  • 2
  • 22
  • 51