# 使用 Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, zypper, scoop 安装 xmlstarlet

查看 xmlstarlet 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:xmlstarlet
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install xmlstarlet
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install xmlstarlet
```

  证据: MacPorts ports tree: textproc/xmlstarlet/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add xmlstarlet
```

  证据: Alpine Linux edge package indexes: xmlstarlet from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install xmlstarlet
```

  证据: Debian stable package indexes: xmlstarlet from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install xmlstarlet
```

  证据: Fedora Rawhide package metadata: xmlstarlet from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#xmlstarlet
```

  证据: nixpkgs package indexes: pkgs/by-name/xm/xmlstarlet/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S xmlstarlet
```

  证据: Arch Linux sync databases: xmlstarlet from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install xmlstarlet
```

  证据: openSUSE Tumbleweed package metadata: xmlstarlet from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install xmlstarlet
```

  证据: Chocolatey community package catalog: xmlstarlet from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','wsl-ubuntu-2204'

- Scoop (92%):

```sh
scoop install main/xmlstarlet
```

  证据: Scoop official bucket manifest trees: bucket/xmlstarlet.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:xmlstarlet
- **软件包管理器:** Homebrew
- **版本:** 1.6.1
- **来源摘要:** XML command-line utilities
- **主页:** <https://xmlstar.sourceforge.net/>
- **最后更新:** 2026-07-10T09:59:34-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- xml (别名)
- xmlstarlet (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.6.1
## 项目历史与用法

XMLStarlet is the classic Unix-shell XML toolkit: query, transform, validate, edit, format, canonicalize, and inspect XML from a single command-line interface. It was explicitly framed as doing for XML what grep, sed, awk, diff, patch, and related tools do for plain text.

### 项目历史

The SourceForge news archive records the first XMLStarlet release in May 2003, describing a C program using GNOME's libxml2 and libxslt to query, check, transform, search, and edit XML documents. The 0.1.0 announcement a few days later stated the project's goal as creating a command-line XML toolkit for shell prompts and automated processing.

Early releases moved quickly through 2003 and 2004, including validation fixes, Relax NG support, Windows availability, HP-UX binaries, and a FreeBSD port. Version 1.0.0 was announced in January 2005, and later distribution files show the 1.6.1 source release in 2014.

The project homepage later noted that development had stalled and asked for help with maintenance, bug fixes, and Windows packaging. That maintenance note is part of the package's history: XMLStarlet became stable infrastructure, with far more downstream script value than upstream churn.

### 采用历史

XMLStarlet spread because it matched the way Unix users already handled text: one executable, composable subcommands, stdin/stdout behavior, and concise XPath/XSLT operations. Early SourceForge news called out a FreeBSD port in 2004 and Windows builds, showing that adoption was not limited to one Unix family.

### 使用方式

Common uses include XPath extraction with xml sel, in-place-like XML editing with xml ed, XSLT transformation with xml tr, validation against DTD, XSD, or Relax NG with xml val, pretty-printing with xml fo, canonicalization with xml c14n, escaping text, listing element structure, and turning directory listings into XML.

The user guide emphasizes that the select command generates and applies XSLT from command-line templates, which lets shell scripts perform structured XML queries without writing a separate stylesheet.

### 为什么软件包爱好者会关心

XMLStarlet is one of the few XML tools that feels native in a pipeline. For package nerds, it is the dependable answer to 'jq, but for XML before jq existed': small enough to install everywhere, powerful enough for metadata rewrites, and old enough to appear in build scripts, distro tooling, and release automation.

### 时间线

- 2003-05-07: SourceForge announced the first XMLStarlet release and project site updates.
- 2003-05-11: XMLStarlet 0.1.0 was released with the command-line XML toolkit goal.
- 2004-07-01: The project announced that the FreeBSD port was ready.
- 2005-01-29: XMLStarlet 1.0.0 was released.
- 2014-08-09: SourceForge files list xmlstarlet-1.6.1 as the latest source release.

### Related projects

- Related projects and technologies include libxml2, libxslt, xsltproc, xmllint, XPath, XSLT, EXSLT, Relax NG, XML canonicalization, DocBook, and shell text tools such as grep, sed, awk, diff, and patch.

### 来源

- <https://sourceforge.net/p/xmlstar/news/>
- <https://sourceforge.net/projects/xmlstar/files/>
- <https://xmlstar.sourceforge.net/>
- <https://xmlstar.sourceforge.net/doc/UG/ch01.html>
- <https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html>


## 安全说明

没有找到 xmlstarlet 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 其他软件包管理器记录

- Debian apt - xmlstarlet - 1.6.1-4: normalized package name match | Debian stable package indexes: xmlstarlet from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command line XML toolkit | http://xmlstar.sourceforge.net/
- Nix - xmlstarlet: normalized package name match | nixpkgs package indexes: pkgs/by-name/xm/xmlstarlet/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - xmlstarlet - 1.6.1-4: normalized package name match | Ubuntu 24.04 LTS package indexes: xmlstarlet from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command line XML toolkit | http://xmlstar.sourceforge.net/
- apk - xmlstarlet - 1.6.1-r2: normalized package name match | Alpine Linux edge package indexes: xmlstarlet from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A set of tools to transform, query, validate, and edit XML documents | https://xmlstar.sourceforge.net/
- apk - xmlstarlet-doc - 1.6.1-r2: normalized package name match | Alpine Linux edge package indexes: xmlstarlet-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A set of tools to transform, query, validate, and edit XML documents (documentation) | https://xmlstar.sourceforge.net/
- dnf - xmlstarlet - 1.6.1-31.fc45: normalized package name match | Fedora Rawhide package metadata: xmlstarlet from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Command Line XML Toolkit | http://xmlstar.sourceforge.net/
- pacman - xmlstarlet - 1.6.1-6: normalized package name match | Arch Linux sync databases: xmlstarlet from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A set of tools to transform, query, validate, and edit XML documents | http://xmlstar.sourceforge.net/
- zypper - xmlstarlet - 1.6.1-4.3: normalized package name match | openSUSE Tumbleweed package metadata: xmlstarlet from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Command Line Tool to Process XML Documents | https://sourceforge.net/projects/xmlstar/
- MacPorts - xmlstarlet: normalized package name match | MacPorts ports tree: textproc/xmlstarlet/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - xmlstarlet: normalized package name match | Chocolatey community package catalog: xmlstarlet from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','wsl-ubuntu-2204'
- Scoop - main/xmlstarlet: normalized package name match | Scoop official bucket manifest trees: bucket/xmlstarlet.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/xmlstarlet.yml](https://github.com/mxcl/pkgdb/blob/main/combined/xmlstarlet.yml)


## 来源

- pkg.so package database
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
