#!/bin/sh

FILENAME=$1
TAG=$2
XTAG=$3
XTAG=${XTAG:-"_wrapper"}

xml-to-json ${FILENAME} | jq -c ".${XTAG}.${TAG}[]"


#!/bin/sh
FILENAME=$1
FILENAME=$(echo ${FILENAME} | sed 's/.xml$//')
TAG=$2
TAG=${TAG:-${FILENAME}}
XTAG=$3
XTAG=${XTAG:-"_wrapper"}

xml-to-json ${FILENAME}.xml | jq -c ".${XTAG}.${TAG}[]"


Update with .xml filename filter
Update with .xml filename filter
