2020-05-04 23:01:31 +02:00
|
|
|
# from xml
|
2019-11-30 13:38:52 +01:00
|
|
|
|
|
|
|
Parse text as `.xml` and create table. Use this when nushell cannot dertermine the input file extension.
|
|
|
|
|
2020-05-04 23:01:31 +02:00
|
|
|
Syntax: `from xml`
|
2019-11-30 13:38:52 +01:00
|
|
|
|
|
|
|
## 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:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
> 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>
|
|
|
|
```
|
|
|
|
|
2020-05-04 23:01:31 +02:00
|
|
|
We can use `from xml` to read the input like a `xml` file:
|
2019-11-30 13:38:52 +01:00
|
|
|
|
|
|
|
```shell
|
2020-05-04 23:01:31 +02:00
|
|
|
> open world.txt | from xml
|
2019-11-30 13:38:52 +01:00
|
|
|
━━━━━━━━━━━━━━━━
|
|
|
|
world
|
|
|
|
────────────────
|
|
|
|
[table 7 rows]
|
|
|
|
━━━━━━━━━━━━━━━━
|
2020-05-04 23:01:31 +02:00
|
|
|
```
|