mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-11 17:48:36 +00:00
Append docs
This commit is contained in:
parent
21ad08aa23
commit
247d79deb2
@ -210,6 +210,11 @@ will output
|
|||||||
<map xmlns="some-namespace" xmlns:xsi="some-instance" some-instance:schemaLocation="some-url"></map>
|
<map xmlns="some-namespace" xmlns:xsi="some-instance" some-instance:schemaLocation="some-url"></map>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
instead of
|
||||||
|
```xml
|
||||||
|
<map xmlns="some-namespace" xsi="some-instance" schemaLocation="some-url"></map>
|
||||||
|
```
|
||||||
|
|
||||||
## Parse xml: keep raw attribute namespace
|
## Parse xml: keep raw attribute namespace
|
||||||
Given a sample.xml file of:
|
Given a sample.xml file of:
|
||||||
```xml
|
```xml
|
||||||
@ -228,6 +233,11 @@ will output
|
|||||||
<map xmlns="some-namespace" xmlns:xsi="some-instance" xsi:schemaLocation="some-url"></map>
|
<map xmlns="some-namespace" xmlns:xsi="some-instance" xsi:schemaLocation="some-url"></map>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
instead of
|
||||||
|
```xml
|
||||||
|
<map xmlns="some-namespace" xsi="some-instance" schemaLocation="some-url"></map>
|
||||||
|
```
|
||||||
|
|
||||||
## Encode xml: simple
|
## Encode xml: simple
|
||||||
Given a sample.yml file of:
|
Given a sample.yml file of:
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@ -408,6 +408,9 @@ func documentXMLDecodeKeepNsScenario(w *bufio.Writer, s formatScenario) {
|
|||||||
writeOrPanic(w, "will output\n")
|
writeOrPanic(w, "will output\n")
|
||||||
|
|
||||||
writeOrPanic(w, fmt.Sprintf("```xml\n%v```\n\n", processFormatScenario(s, NewXMLDecoder("+", "+content", false, true, false), NewXMLEncoder(2, "+", "+content"))))
|
writeOrPanic(w, fmt.Sprintf("```xml\n%v```\n\n", processFormatScenario(s, NewXMLDecoder("+", "+content", false, true, false), NewXMLEncoder(2, "+", "+content"))))
|
||||||
|
|
||||||
|
writeOrPanic(w, "instead of\n")
|
||||||
|
writeOrPanic(w, fmt.Sprintf("```xml\n%v```\n\n", processFormatScenario(s, NewXMLDecoder("+", "+content", false, false, false), NewXMLEncoder(2, "+", "+content"))))
|
||||||
}
|
}
|
||||||
|
|
||||||
func documentXMLDecodeKeepNsRawTokenScenario(w *bufio.Writer, s formatScenario) {
|
func documentXMLDecodeKeepNsRawTokenScenario(w *bufio.Writer, s formatScenario) {
|
||||||
@ -426,6 +429,9 @@ func documentXMLDecodeKeepNsRawTokenScenario(w *bufio.Writer, s formatScenario)
|
|||||||
writeOrPanic(w, "will output\n")
|
writeOrPanic(w, "will output\n")
|
||||||
|
|
||||||
writeOrPanic(w, fmt.Sprintf("```xml\n%v```\n\n", processFormatScenario(s, NewXMLDecoder("+", "+content", false, true, true), NewXMLEncoder(2, "+", "+content"))))
|
writeOrPanic(w, fmt.Sprintf("```xml\n%v```\n\n", processFormatScenario(s, NewXMLDecoder("+", "+content", false, true, true), NewXMLEncoder(2, "+", "+content"))))
|
||||||
|
|
||||||
|
writeOrPanic(w, "instead of\n")
|
||||||
|
writeOrPanic(w, fmt.Sprintf("```xml\n%v```\n\n", processFormatScenario(s, NewXMLDecoder("+", "+content", false, false, false), NewXMLEncoder(2, "+", "+content"))))
|
||||||
}
|
}
|
||||||
|
|
||||||
func documentXMLEncodeScenario(w *bufio.Writer, s formatScenario) {
|
func documentXMLEncodeScenario(w *bufio.Writer, s formatScenario) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user