简体   繁体   English

如何在 Open Office (Basic) 中使用 Imports System.Xml?

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

Whenever I place Imports System.Xml above the rest of the code I get an error:每当我将Imports System.Xml放在代码的 rest 上方时,我都会收到错误消息:
BASIC syntax error.基本语法错误。 Expected: Sub.预期:子。

And when I place it inside any of the Subs I get another error:当我将它放在任何 Subs 中时,我得到另一个错误:
BASIC syntax error.基本语法错误。 Unexpected symbol: Stop.意外符号:停止。

Are we even able to use Imports in the code in Open Office?我们甚至可以在 Open Office 的代码中使用Imports吗?
Or do I need to import in one of the menus?还是我需要在其中一个菜单中导入?

From my google search, Imports System.Xml is for .NET technologies.从我的谷歌搜索中, Imports System.Xml适用于 .NET 技术。 Is StarBasic a .NET technology? StarBasic 是 .NET 技术吗? No.不。

You can create projects in C# or VB.Net that use LibreOffice's UNO API.您可以在 C# 或 VB.Net 中创建使用 LibreOffice 的 UNO API 的项目。

Or maybe you want to know how to work with XML in a LibreOffice macro.或者,也许您想知道如何在 LibreOffice 宏中使用 XML。 In that case, there are many different answers.在这种情况下,有许多不同的答案。 Personally I would create a Python-UNO macro and start with import xml.etree .我个人会创建一个 Python-UNO 宏并从import xml.etree开始。 Alternatively, the UNO API provides access to the powerful XML libraries built into LibreOffice.或者,UNO API 提供对 LibreOffice 中内置的强大 XML 库的访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM