Closed nichtich closed 10 years ago
$cat input.xml <?xml version="1.0"?> <doc> <id>1</id> <id>2</id> <id>3</id> </doc> $ catmandu convert XML --path "/doc/*" --keep-root 1 to JSON < input.xml { "id": 1 } { "id": 2 } { "id": 3 }
Without --keep-root, each <id> would be ignored as root or a record.
--keep-root
<id>
This works. keep-root is enabled by default, so it's not needed.
Without
--keep-root
, each<id>
would be ignored as root or a record.