gpt4 book ai didi

xml - 如何使用 Notepad++ 从xml文件中提取数据?

转载 作者:数据小太阳 更新时间:2023-10-29 01:42:46 26 4
gpt4 key购买 nike

我有一个带有结构的 xml 响应(例如组 > 子组 > 子记录)。

我想提取所有 childRecord.name 的列表作为单独的数据。我希望我可以在 notepad++ 中快速做一些事情,然后将结果粘贴到 excel 中。

我不确定在这种情况下如何编写一个宏可以为我做这件事。

<group>

<subgroup>

<childrecord name="abc">zzz</childrecord>

</subgroup>

</group>

最佳答案

直接用 MS Excel 打开 XML 文件。

更新

来自 support.office.com :

Import an XML data file as an XML table

  1. Click Developer > Import.

    If you don't see the Developer tab, see Show the Developer tab.

  2. In the Import XML dialog box, locate and select the XML data file (.xml) you want to import, and click Import.

    If the XML data file doesn't refer to a schema, Excel infers the schema from the XML data file.

  3. In the Import Data dialog box, do one of the following:

    a. Select XML table in existing worksheet to import the contents of the XML data file into an XML table in your worksheet at the specified cell location.

    b. Select XML table in new worksheet to import the contents of the file into an XML table in a new worksheet starting at cell A1. The schema of the XML data file is displayed in the XML Source task pane.

  4. If the XML data file doesn't refer to a schema, then Excel infers the schema >from the XML data file.

  5. To control the behavior of XML data (such as data binding, format, and layout), click Properties, which displays the XML Map properties dialog box. For example, existing data in a mapped range will be overwritten when you import data by default, but you can change this.

在 LibreOffice Calc 中导入 XML 文件:

  1. 从菜单栏转到Data > XML Source...
  2. 单击浏览按钮(文件夹图标)并从对话框中选择文件
  3. 选择需要的节点
  4. 填写 Mapped cell 字段,例如 A1
  5. 点击导入按钮。

关于xml - 如何使用 Notepad++ 从xml文件中提取数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10955431/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com