From 25e91abe3a467460fe67fb8ab17b470baa277ee2 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Sun, 13 Nov 2022 11:16:29 +1100 Subject: [PATCH] v4.30.2 --- operators/slice-array.md | 2 +- usage/xml.md | 70 ++++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/operators/slice-array.md b/operators/slice-array.md index 29d0dafe..40ebea49 100644 --- a/operators/slice-array.md +++ b/operators/slice-array.md @@ -1,4 +1,4 @@ -# Slice Array +# Slice/Splice Array The slice array operator takes an array as input and returns a subarray. Like the `jq` equivalent, `.[10:15]` will return an array of length 5, starting from index 10 inclusive, up to index 15 exclusive. Negative numbers count backwards from the end of the array. diff --git a/usage/xml.md b/usage/xml.md index 11c4193e..09f77b09 100644 --- a/usage/xml.md +++ b/usage/xml.md @@ -258,55 +258,55 @@ cat: ``` ## Parse xml: keep attribute namespace +Defaults to true + Given a sample.xml file of: ```xml - - - + ``` then ```bash -yq -p=xml -o=xml --xml-keep-namespace '.' sample.xml +yq -p=xml -o=xml --xml-keep-namespace=false '.' sample.xml ``` will output ```xml - -``` - -instead of -```xml - - -``` - -## Parse xml: keep raw attribute namespace -Given a sample.xml file of: -```xml - - - - - -``` -then -```bash -yq -p=xml -o=xml --xml-keep-namespace --xml-raw-token '.' sample.xml -``` -will output -```xml - - -``` - -instead of -```xml - ``` +instead of +```xml + + +``` + +## Parse xml: keep raw attribute namespace +Defaults to true + +Given a sample.xml file of: +```xml + + + +``` +then +```bash +yq -p=xml -o=xml --xml-raw-token=false '.' sample.xml +``` +will output +```xml + + +``` + +instead of +```xml + + +``` + ## Encode xml: simple Given a sample.yml file of: ```yaml