Fix xml docs (#8462)

See https://github.com/nushell/nushell.github.io/pull/828
This commit is contained in:
Hofer-Julian 2023-03-15 13:21:48 +01:00 committed by GitHub
parent 494a07f6f3
commit 24ee381fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -35,10 +35,10 @@ impl Command for FromXml {
fn extra_usage(&self) -> &str { fn extra_usage(&self) -> &str {
r#"Every XML entry is represented via a record with tag, attribute and content fields. r#"Every XML entry is represented via a record with tag, attribute and content fields.
To represent different types of entries different values are written to this fields: To represent different types of entries different values are written to this fields:
1. Tag entry: {tag: <tag name> attrs: {<attr name>: "<string value>" ...} content: [<entries>]} 1. Tag entry: `{tag: <tag name> attrs: {<attr name>: "<string value>" ...} content: [<entries>]}`
2. Comment entry: {tag: '!' attrs: null content: "<comment string>"} 2. Comment entry: `{tag: '!' attrs: null content: "<comment string>"}`
3. Processing instruction (PI): {tag: '?<pi name>' attrs: null content: "<pi content string>"} 3. Processing instruction (PI): `{tag: '?<pi name>' attrs: null content: "<pi content string>"}`
4. Text: {tag: null attrs: null content: "<text>"}. 4. Text: `{tag: null attrs: null content: "<text>"}`.
Unlike to xml command all null values are always present and text is never represented via plain Unlike to xml command all null values are always present and text is never represented via plain
string. This way content of every tag is always a table and is easier to parse"# string. This way content of every tag is always a table and is easier to parse"#

View File

@ -34,10 +34,10 @@ impl Command for ToXml {
fn extra_usage(&self) -> &str { fn extra_usage(&self) -> &str {
r#"Every XML entry is represented via a record with tag, attribute and content fields. r#"Every XML entry is represented via a record with tag, attribute and content fields.
To represent different types of entries different values must be written to this fields: To represent different types of entries different values must be written to this fields:
1. Tag entry: {tag: <tag name> attrs: {<attr name>: "<string value>" ...} content: [<entries>]} 1. Tag entry: `{tag: <tag name> attrs: {<attr name>: "<string value>" ...} content: [<entries>]}`
2. Comment entry: {tag: '!' attrs: null content: "<comment string>"} 2. Comment entry: `{tag: '!' attrs: null content: "<comment string>"}`
3. Processing instruction (PI): {tag: '?<pi name>' attrs: null content: "<pi content string>"} 3. Processing instruction (PI): `{tag: '?<pi name>' attrs: null content: "<pi content string>"}`
4. Text: {tag: null attrs: null content: "<text>"}. Or as plain "<text>" instead of record. 4. Text: `{tag: null attrs: null content: "<text>"}`. Or as plain "<text>" instead of record.
Additionally any field which is: empty record, empty list or null, can be omitted."# Additionally any field which is: empty record, empty list or null, can be omitted."#
} }