Files
.azure
.cargo
.circleci
.github
assets
crates
debian
docker
docs
commands
README.md
append.md
average.md
calc.md
cd.md
compact.md
config.md
count.md
date.md
default.md
echo.md
edit.md
enter.md
env.md
exit.md
fetch.md
first.md
format.md
from-csv.md
from-json.md
from-ods.md
from-toml.md
from-tsv.md
from-xlsx.md
from-xml.md
from-yaml.md
get.md
group-by.md
help.md
histogram.md
history.md
inc.md
insert.md
last.md
lines.md
nth.md
open.md
pick.md
pivot.md
prepend.md
ps.md
reject.md
reverse.md
save.md
shells.md
size.md
sort-by.md
split-column.md
split-row.md
str.md
sum.md
sys.md
tags.md
to-csv.md
to-json.md
to-toml.md
to-tsv.md
to-url.md
to-yaml.md
trim.md
uniq.rs
version.md
where.md
which.md
docker.md
philosophy.md
images
src
tests
.editorconfig
.gitignore
.gitpod.Dockerfile
.gitpod.yml
CODE_OF_CONDUCT.md
Cargo.lock
Cargo.toml
LICENSE
Makefile.toml
README.md
TODO.md
build.rs
features.toml
rustfmt.toml
nushell/docs/commands/from-xml.md
2019-11-30 13:38:52 +01:00

873 B

from-xml

Parse text as .xml and create table. Use this when nushell cannot dertermine the input file extension.

Syntax: from-xml

Examples

Let's say we've got a file in xml format but the file extension is different so Nu can't auto-format it:

> open world.txt
<?xml version="1.0" encoding="utf-8"?>
<world>
    <continent>Africa</continent>
    <continent>Antarctica</continent>
    <continent>Asia</continent>
    <continent>Australia</continent>
    <continent>Europe</continent>
    <continent>North America</continent>
    <continent>South America</continent>
</world>

We can use from-xml to read the input like a xml file:

> open world.txt | from-xml
━━━━━━━━━━━━━━━━
 world
────────────────
 [table 7 rows]
━━━━━━━━━━━━━━━━